As this is a State Management forum, I was looking for some details on the topic. I did some search found that there is one mentioning about saving table's control(textbox...)s' value in SaveViewState() but re-populate the table in LoadViewState(), confusing
me. Any insight?
I understand its a state management forum and the links I provided talk about state management if you read the documents. Dynamic controls should be created in Page.Init as ViewState is not available until Page_Load.
So if you read the initial documents I posted and the 2 documents above you will see the importance of ViewState and when it is loaded and how to save data to it. If your controls are created on Page.Init and you save the values to ViewState on Page.Load
then on Page.PreRender you can gather those values from ViewState and assign them to your controls. SaveViewState and LoadViewState have arrays of objects. So you access them array index when you save or look for objects to get values from.
Remember to mark as answer if this post answered or solved your problem.
b471code3
Star
13877 Points
2598 Posts
Re: Dynamic table content
Jan 30, 2012 12:33 PM|LINK
I understand its a state management forum and the links I provided talk about state management if you read the documents. Dynamic controls should be created in Page.Init as ViewState is not available until Page_Load.
SaveViewState() LoadViewState()
So if you read the initial documents I posted and the 2 documents above you will see the importance of ViewState and when it is loaded and how to save data to it. If your controls are created on Page.Init and you save the values to ViewState on Page.Load then on Page.PreRender you can gather those values from ViewState and assign them to your controls. SaveViewState and LoadViewState have arrays of objects. So you access them array index when you save or look for objects to get values from.