0
我在處理程序類中編寫了以下內容來檢查會話 satate。使用處理程序類
public void ProcessRequest(HttpContext context)
{
if (context.Session["UserID"] == null || context.Session["ClientCode"] == null || context.Session["UserType"] == null)
{
context.Response.Redirect("~/LogIn.aspx");
}
}
現在我需要讓我的應用程序的每個.aspx頁面中我怎麼能做到這一點的影響?
您可以將此代碼放入Global.asax文件 –