public class BasePageMain : Page
{
public BasePageMain()
{
}
protected override void OnInitComplete(EventArgs e)
{
base.OnInitComplete(e);
if (!StringUtil.IsNotBlank(HttpContext.Current.Session["LoginName"]))
{
dfcb.SQLHelper.WriteTxt("session失效跳转到登陆页面----");
string ClientScript = @"<script language='javascript'>parent.location.href = '" + Request.ApplicationPath + "/ClassicLogin.aspx';</script>";
HttpContext.Current.Response.Write(ClientScript);
HttpContext.Current.Response.End();
}
}
}
}
本文详细阐述了页面初始化过程中的关键步骤,包括事件响应、登录状态验证,并在登录状态无效时实现页面跳转至登录页面。
797

被折叠的 条评论
为什么被折叠?



