Dynamically Loading Controls

  • Thread starter Thread starter Erica
  • Start date Start date
E

Erica

I thought that dynamically loading user controls would stop problem I am
having with user pressing back button within my app (if back button is
clicked and then any link is clicked on that page, the dreadful 'Failed to
load viewstate' error displays. I thought that when loading the controls
dynamically, the page doesn't change so clicking the back button would
completely take them out of the app. Am I wrong or is there a property or
something that needs to be set for this to be true.
 
load viewstate errors are caused when on posted back, the control tree (the
controls created, and their ids) doesn't match the control tree used to
create the viewstate stored in a hidden field in ther browser.

you are probably keep state info for the dynamic controls on the server,
rather then on the client (say in a hidden field), so when the user navigates
to earlier version of the page, the wrong controls are created on postback.

-- bruce (sqlwork.com)
 
Back
Top