Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Web Controls (http://www.velocityreviews.com/forums/f63-asp-net-web-controls.html)
-   -   maintain viewstate using dynamically loaded server controls (http://www.velocityreviews.com/forums/t771932-maintain-viewstate-using-dynamically-loaded-server-controls.html)

Thijs 12-02-2003 03:12 PM

maintain viewstate using dynamically loaded server controls
 
Hello,

Does anybody know if it's possible to maintain view state using dynamically
loaded server controls?

I have a couple of pages which load web controls using the
Page.LoadControl() function. However, since my code recreates the controls
at each request, view state is not preserved. Is there a way to work around
this?

Thanks in advance for your help.

Regards,

Thijs



Dominic 12-03-2003 10:18 PM

Re: maintain viewstate using dynamically loaded server controls
 
Set the .ID attribute on your controls

Brenda 12-04-2003 10:03 PM

Re: maintain viewstate using dynamically loaded server controls
 
This has been a pain in the butt many times for me too... you might want
to try this which I recently came across:

Denis Bauer's DynamicControlsPlaceholder
http://www.denisbauer.com/ASPNETCont...aceholder.aspx


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


All times are GMT. The time now is 08:08 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.