davecapone
Programmer
Hi,
I have an ASP.NET Page that has an asp:table. On Postback I dynamically add rows to this Table, however on subsequent postbacks I get the following error message:
Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request. For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request.
Because of the formatting of the Table, I cannot use a Repeater or DataGrid, also because not all cells in the table are DataBound. Is there a way to preserve Viewstate when dynamically adding TableRows tot he table so subsequent PostBacks are possible?
I have an ASP.NET Page that has an asp:table. On Postback I dynamically add rows to this Table, however on subsequent postbacks I get the following error message:
Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request. For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request.
Because of the formatting of the Table, I cannot use a Repeater or DataGrid, also because not all cells in the table are DataBound. Is there a way to preserve Viewstate when dynamically adding TableRows tot he table so subsequent PostBacks are possible?