Okay Session could be used across multiple worker processes but you have to set the session vars to be stored in State Server or Sql Server
nntp://msnews.microsoft.com/microsoft.public.dotnet.framework.aspnet/<
[email protected]>
Charlie,
There are a couple of ways to store information.
ViewState is most frequently used one cause there aren't excessive server overheads and the data is on client which is posted back
Storing in Session could be another way but again this would only work in a scenario where your application runs off a single aspnet worker process.
I had an interesting scenario where I did not want to keep the data in session (time out would sort of release the values) and I ended up creating a Cookie class to store some values (like say the selected item text for a dropdownlist and created a singleton which return client specific data using HttpContext.Current)
It works great but you have to sort of balance whether you really need that sort of implementation. Anything you do has atleast some overhead attached to it.
You could potentially even store it in database. But again you are looking at a db call to retrieve data.
Regards,
HD
From:Charlie [mailto:
[email protected]]
Posted At: 07 March 2004 07:33
Posted To: aspnet
Conversation: Persisting State Information
Subject: Persisting State Information
nntp://msnews.microsoft.com/microsoft.public.dotnet.framework.aspnet/<
[email protected]>
Hi,
Is there a way of persisting state information for a server control
without using ViewState? I'm currently using Page.Session() but I
don't think this is the best way. What's the preferred method?
Thanks
Charlie
[microsoft.public.dotnet.framework.aspnet]