Session
Introduction of session and types of session.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
MuthuMari MPosted May 9, 2012, 2:49 AM
A variable is stored temporary in the computer memory, but sometimes we need to hold data across different pages. Here is when Session Variables come very helpful. They can retain their values as long as the user:
(unless specified otherwise)
To create a session variables:
Session("VariableNameHere") = "VariableValueHere"
To set a different session time out in minutes:
Session.TimeOut = 40
To remove the session variable:
Session.Contents.Remove("VariableNameHere")
pls refer this url :http://www.c-sharpcorner.com/UploadFile/ganesh.nataraj/ASPdotNETSessionState09212005235624PM/ASPdotNETSessionState.aspx
thanks
Satyapriya NayakPosted May 8, 2012, 10:00 PM
Sessions can be used to store even complex data for the user just like cookies. Actually, sessions will use cookies to store the data, unless you explicitly tell it not to. Sessions can be used easily in ASP.NET with the Session object. We will re-use the cookie example, and use sessions instead. Keep in mind though, that sessions will expire after a certain amount of minutes, as configured in the web.config file. Markup code: And here is the CodeBehind: Session Management can be achieved in two ways
1)InProc
2)OutProc
An inproc is one, which runs in the same process area as that of the client giving the advantage of speed but the disadvantage of stability because if it crashes it takes the client application also with it. Outproc is one, which works outside the client's memory thus giving stability to the client, but we have to compromise a bit on speed.
Also Please refer Our recommended articles
Thanks