Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Global.asax - actual application level object
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00919040
Message ID:
00919506
Vues:
13
>>I have a web app that is wizard style. I want to save my user input into a class that persists from page to page. Anyone know how to do this? I cannot parametize the data and I don't want to create 75+ session variables. :(
>>
>>My humble thanks in advance,
>
>Create a class to encapsulate all the data and put that into your session. If you have a high amount of users at one time you may want to use the database, cause as you said alot of stuff stored in session really affects the IIS memory. You'd be surprised how fast you can pull this stuff out of the sql db on each hit.
>
>And as I said, it scales much better. Also, if you use a web garden or web farm and you wanted this to work you would have to use out-of-proc or sql session store which is MUCH slower than in-proc... or you would have to use sticky ips.

Be careful with those recommendations <g>. Yeah InProc is much faster but I would basically never recommend you use it because there are just too many instances where the app can get blown away from AppDomain restarts.

Also, raw SQL access isn't going to be any faster than SQL Session output, so I think using a session is still a good call.

Batching a bunch of variables into a single object is good form though - I do this all the time and it makes coding much nicer because you can fill this objects much more easily and keep it synched to your data than using a bunch of separate sessions vars. In fact, in many of my apps I data bind directly against these session container objects and only write them out at the end which means a typcial request accesses the session only twice (once to read, and once to write). This is a great way to go even if the persistence of this object is a little more expensive than writing out single values.


+++ Rick ---

>
>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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform