SQL

 Excel

Add-in

  • RockScroll FTW(非常酷,代替原来的代码滚动条)
  • My interested stuff(2008-08-03)    

     

Web

Other

 

How do I detect a session has expired and redirect it to another page

override protected void OnInit(EventArgs e)
  {
       base.OnInit(e);
if (Context.Session != null)
   {    if (Session.IsNewSession)
    {
    string szCookieHeader = Request.Headers["Cookie"];
     if ((null != szCookieHeader) && (szCookieHeader.IndexOf("ASP.NET_SessionId") >= 0))
     {
      Response.Redirect("sessionTimeout.htm");
     } 
    }
   }
  }

相关文章:

  • 2021-08-01
  • 2021-10-07
  • 2021-09-07
  • 2021-09-29
  • 2021-08-30
  • 2022-02-27
  • 2021-06-13
  • 2021-11-19
猜你喜欢
  • 2021-12-09
  • 2022-01-01
  • 2021-12-19
  • 2021-07-05
  • 2021-08-09
  • 2021-07-18
  • 2022-02-21
相关资源
相似解决方案