Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ViewState vs SessionState
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00761040
Message ID:
00761124
Vues:
18
Hi Bonnie!

Based on the information you are providing where your DataSet will contain very few records, I would recommend using ViewState. You will be passing back and forth the information but it since your data is so small, it shouldn't really affect performance. Are you needing to use the DataSet on different pages or is it isolated to this one page? This could effect your decision. SessionState is used for referencing objects during the entire session. ViewState is for the page, unless the objects are too large to marshal back and forth or they can't be serialized.

>Hey gang,
>
>I'm just starting to research this topic now, and I'd like some input from some of you guys who are doing one or the other. Pro's and con's of each methodology would be nice.
>
>I'm trying to decide how to persist my DataSet. From what I've read (and remember, I've just started researching this), it seems that if you don't have a lot of data in your DataSet, then maybe saving the DataSet to the ViewState might be ok. In the WebForm I'm working on now, I am dealing with a fairly small DataSet (a few tables with not a lot of columns, mostly having one row in each table, some might have multiple rows). The other option seems to be storing the DataSet server-side in a SessionState. (As long as, if I understand it correctly, you can overcome problems with Server Farms.) It seems that it's best to avoid that unless needed (which would be if the data is too large to store in a ViewState).
>
>Am I making correct assumptions? Anyone have any practical experience with this? What are the rest of you guys doing?
>
>Any input would be much appreciated!!
>
>TIA,
>~~Bonnie
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform