Why HttpContext.Current.Session is null in Global.asax?

前端 未结 2 1910
小蘑菇
小蘑菇 2020-12-09 17:32

I\'m using VS2010 and created a simple asp. web forms application, using Development Server to test it.
I try to store user data - queried from sql server - in the sessi

2条回答
  •  时光说笑
    2020-12-09 18:06

    try to use the below code in page_Load

    Response.AppendHeader("Refresh", Convert.ToString(Session.Timeout * 15) + "; 
    URL=SessionExpPage.aspx");
    

提交回复
热议问题