Viewstate only being maintained second time around

  • Thread starter Thread starter John
  • Start date Start date
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.
 
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
 
Back
Top