hi,
Is there any way to preserve data throughout web application session without using session object or database?
Thanks SNA
hi,
Is there any way to preserve data throughout web application session without using session object or database?
Thanks SNA
You can pass them through the URL using
response.redirect("URL")
OR if you want to hide the variables
Server.Transfer("URL",True)
You've a couple of options... you could persist everything on the query string e.g.
http://www.example.com/MyPage.aspx?PersistedValue1=Value1&PersistedValue2=Value2
Or you could store them in Viewstate/Cache/Application vars if they're page level or global settings.
Though I'm not really sure how any of these are any better than using Session. Why don't you want to use that.
It depends what it is about Session and Databases that you don't like. For example:
You could setup a seperate process (like a Windows Service) to store session state information for you. That process could keep the information in memory or in files, whatever you like really. Checkout this article for more info.
You could effectively implement you're own session system that stored user specific implementation in XML files on the web server.
You could pass information from page to page using QueryString parameters.
You could use the asp.net Cache object and key the information using a UserID.
You can create a new GUID that you send as a cookie and store the GUIDs in a custom object saved in a application object. Having said that, your application will likely perform better with the session management built into ASP.NET.
Here are some options for persisting data: