我有一个会话,其中包含List(of String)我在Main.aspx. 在我Global.asax的中,我执行以下代码以在触发Sessiona 后检索值。Timer
Private Sub Application_AcquireRequestState(sender As Object, e As EventArgs)
If System.Web.HttpContext.Current.Session IsNot Nothing Then
If Session("Products") IsNot Nothing Then
Response.Write(Session("Products").ToString())
End If
End If
End Sub
但是,Session("Products")返回 Null 并Sub退出。我想知道End Subin是否Main.aspx会释放 the Session,因此每当Timer发生火灾时,theSession都是空的。有什么想法吗?