Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Managing state between postbacks to server
Message
General information
Forum:
ASP.NET
Category:
Web forms
Miscellaneous
Thread ID:
00640625
Message ID:
00641885
Views:
16
>>Bob,
>>
>>Since the context of discussion here is state of a variable, let me clarify your comments about state of controls:
>>
>
>Right... so my understanding was you can only use it with controls, and you have to use session state for variables. Or, are you saying you CAN use viewstate to maintain the state of variables too?
>
>BOb

MSDN documentation says that the page object has a Viewstate property too (the page class inherits from Control). I don't know how this renders in HTML, but it seems that you could store a page variable there. The difference between storing state in Viewstate or Session is just a matter of whose resources you want to tax. If you store state in Session, you are taxing the web server. If you store in Viewstate, you are taxing the bandwidth and the client's memory.
Previous
Reply
Map
View

Click here to load this message in the networking platform