Sessions in ASP.Net

Posted by Amitsoni under ASP.NET on 7/18/2008 | Views : 1744 | Status : [Member] | Replies : 4
How to maintain session in asp.net?
plz let me know in practical way...




Responses

Posted by: Bubbly on: 2/22/2010 [Member] Bronze

Up
0
Down
Hello,

check this link

http://www.codeproject.com/KB/aspnet/ExploringSession.aspx

++
Thanks & Regards,
Deepika

Amitsoni, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Shreedar on: 8/20/2015 [Member] Starter | Points: 25

Up
0
Down
Different session modes in asp.net.

1.Inproc Session:
Session maintained in the website process is
called Inproc Session.
Restarting website will erase the session.

2.State server session:
Session maintained out side the website in the
state server is called state server session.
Restarting state server will erase the session.

3.Sql server session:
Session maintained out side the website in the
Sql server database is called sql server session.
Session is maintained until we delete from the
database table.


Regards

Sridhar Thota.
www.dotnet-sridhar.blogspot.com

Amitsoni, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Raja on: 7/18/2008 [Member] Starter

Up
0
Down
You can read following articles

http://csharpaspnet.blogspot.com/2007/05/maintaining-session-state-in-load.html

http://www.coveryourasp.com/Session.asp



Regards,
Raja, USA

Amitsoni, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Majith on: 7/22/2008 [Member] Starter

Up
0
Down
Hi ,

The following code describes the session state as follows,

I m maintaining a session in "Login Page" of my application. Now I m using this in my aspx page in PageLoad look like.....

if (Session["User_ID"] == null || Session["User_ID"].ToString() == "")
{
Response.Redirect("Login.aspx?LE=Expire");

lblMsg.Text="Your Session Expires!";
}

I m setting Session Timeout in Web.config.

Now, When session time expire, its goes to "Login Page" with proper message.....

But When I m putting URL of that page directly in the browser, its again goes to "Login Page" with message.....

The problem is that I don't want the message, its simply goes to "Login Page" without message....



Thnax







Amitsoni, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response