Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Keeping added controls on postback
Message
 
To
22/05/2006 13:22:10
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01123789
Message ID:
01124373
Views:
15
>>Yeah of course controls neeed to be added every time - the page doesn't stay in memory it's a class that gets reloaded on every request.
>>
>>Both viewstate and post data get reassigned on postback but it happens before Page_Load() so if ou looad controls there it's too late for them to be assigned.
>
>I think a great improvements in the next version would be to have those added controls to be preserved. So, we wouldn't have to worry about that on postbacks.

Nooooo.... where woould preseve them? The page goes away after everyhit! You added the controls manually it's your responsibility. If you put them in Markup ASP.NET manages that for you because it becomes part of the class.

You can create a base class and add controls from there and then they will show up everytime in your inherited class.

+++ Rick ---
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform