Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Member
127 Points
151 Posts
Apr 19, 2012 08:09 PM|LINK
ogsim07 this is my code on button login click:- if (rdr.Read()) { Session["User"] = UserName.Text; Session["type"] = rdr[0].ToString(); if (Session["type"].ToString() == "admin") { Response.Redirect("index.aspx"); Literal1.Text = "<b>Hello admin!</b>"; } else { Response.Redirect("index.aspx"); Literal1.Text = "<bHello Student!</b>"; } } else { Literal1.Text = "<b>Invalid credentials</b>"; }
check here:
http://www.codeproject.com/Articles/10550/The-Defibrillator-Keeping-ASP-NET-Session-Alive-Ad
piram
Member
127 Points
151 Posts
Re: session auto expires after few minutes, how to keep it active?
Apr 19, 2012 08:09 PM|LINK
check here:
http://www.codeproject.com/Articles/10550/The-Defibrillator-Keeping-ASP-NET-Session-Alive-Ad