session timeout

i just want to prevent session timeout

1 Reply

PJ Poornima Joy Balan Syncfusion Team June 12, 2007 09:35 AM UTC

Hello,

Here's the code snippet to prevent the session time out.

override protected void OnInit(EventArgs e)
{
base.OnInit(e);

if (Context.Session != null)
{
int int_MilliSecondsTimeOut = (this.Session.Timeout * 60000) - 30000;
string strScript = @"
";
this.Page.RegisterClientScriptBlock("Reconnect", strScript);
}
}

And create reconnect.aspx page, add the following code to the page.

<%@ OutputCache Location="None" VaryByParam="None" %>


Let me know for further queries.

Regards,
Poornima

Loader.
Up arrow icon