Hi.. I've a problem about ViewState.

Z

zimzion

Hi..

My problem is that the ViewState of UserControl is not
consisted when the UserControl is dynamically loaded at
PreRender Event.

That is, A UserControl is dynamically loaded at PreRender
Event of a WebForm. Then, a server control in the
UserControl fires post-back event and at this time the
UserControl is dynamically loaded at Load Event of the
Page. But the ViewState of the loaded UserControl is
completely clear.

Is there any way to consist the ViewState even though
UserControl is loaded at PreRender Event?
 
E

Elliot Rodriguez

ZimZion:

If I read your Q correctly: any changes to ViewState made after PreRender
are not saved. You will have to override the LoadViewState event procedure
to gain access to the ViewState field after the postback.

HTH
 

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

Forum statistics

Threads
474,085
Messages
2,570,597
Members
47,220
Latest member
AugustinaJ

Latest Threads

Top