Viewstate only being maintained second time around

J

John

Hi all,

I have a problem with viewstate being maintained. I use LoadControl to load
a user control and the data is sent down to the client correctly. However,
when I change some data and post it, the viewstate does not seem to load for
the user control upon sending it back down to the client. If I change the
data again, then the viewstate DOES seem to be maintained.

What gives?

Regards
John.
 
S

S. Justin Gengo

John,

You have to be very careful when using load control and viewstate. The
control needs to be reloaded each time.

I'm using this technique on my own website and it's working quite well. I
have some demo code on how to do this in my code library: Just go to
www.aboutfortunate.com and search in the code library for: dynamic user
control.

Sincerely,

--
S. Justin Gengo, MCP
Web Developer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
 

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,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top