Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Oct 01, 2011 08:13 PM by Nazm
Sep 30, 2011 04:32 PM|LINK
I have a Table control, where I add controls to a new the cell, add this new cell to a new row and add this new row to the table.
Page renders fine. How can I have viewstate so that I don't have to call sql server again, get all the values, create new cells, rows and then add to the table?
How can I retain what has been added to the table, instead of re-creating the table all over again evertime there is a postback.
Oct 01, 2011 07:45 PM|LINK
You must recreate the table in each postback, because the table content is created in each postback, then the table haves a similar behaviour to the dynamic controls... they need to be recreated on postback.
so that I don't have to call sql server again
Any doubt, post your comment.
Oct 01, 2011 08:13 PM|LINK
Yes Mavrick , calling SQL server by queries and update table is needed in each postback. because you can't know when the user will leave the page except if there is a save button to confirm the operation.
In this case you can use an Updatepanel.