2
Reply

I have an HTML table with runat=server tag. I am adding rows dynamically (using Javascript) in the table. When i click on submit button to get the values of this table. I lost all the values. How i can get values from table.

Vinod Soni

Vinod Soni

17y
6.3k
0
Reply

    You can use Request object to obtain the values in codebehind.

    Because you are creating a post back the data in the table will be lost when you are posting back to server. You need to save the data before it is posted back to the server.

    If you are using Visual Studio .NET Environment then probably your problem can be solved by storing the information of the dynamically added rows to  hidden variables.

    If you are adding the rows dynamically in a HTML page then only through script you can save the data in the added rows to ViewState or any invisible control.