Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Managing state between postbacks to server
Message
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires Web
Divers
Thread ID:
00640625
Message ID:
00641910
Vues:
19
Viewstate is bound to controls that support it so no it doesn't apply to variables.

Viewstate is a tricky thing actually and a very double edged sword. If you use viewstate on any of the list controls they persist the entire list contents which can be huge if you have a lot of data. Yet it's the only way to automatically maintain say a selection in a list box through the Web Control interface.

From what I've seen so far I've been very leary of ViewState, especially since text controls will automatically retain their data content without viewstate which is probably the main feature that is of interest in the Web Form's metaphor.

+++ Rick ---


>>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
+++ 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?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform