Dynamically Loading Controls

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.
 
B

bruce barker

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top