Answered by:
Session Variables TimeOut

Question
-
User-158363518 posted
hi
I use a session variable to fill the repeater on a page.Example :
if(Session["ProductGroupID"]!=null)
{
// Some Code
string GroupID= Session["ProductID"].ToSting();
ProductList(GroupID);
}
How I can increase Timeout of This Session ?
Monday, August 27, 2018 7:14 AM
Answers
-
User-1171043462 posted
In Web.Config file, you can set any value in minutes. Default is 20 minutes
<system.web> <sessionState timeout="30"></sessionState> </system.web>
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, August 27, 2018 8:31 AM -
User-369506445 posted
hi
if you want to be set programmatically you can set it in Global File
Global.asax file: Under the Session_Start method, set the timeout property of the session to the required value like this
public class Global : HttpApplication { protected void Session_Start(Object sender, EventArgs e) { Session.Timeout = 20 ; } }
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, August 27, 2018 9:30 AM
All replies
-
User-1171043462 posted
In Web.Config file, you can set any value in minutes. Default is 20 minutes
<system.web> <sessionState timeout="30"></sessionState> </system.web>
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, August 27, 2018 8:31 AM -
User-369506445 posted
hi
if you want to be set programmatically you can set it in Global File
Global.asax file: Under the Session_Start method, set the timeout property of the session to the required value like this
public class Global : HttpApplication { protected void Session_Start(Object sender, EventArgs e) { Session.Timeout = 20 ; } }
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, August 27, 2018 9:30 AM