日期:2014-05-18 浏览次数:20632 次
//重写Page基类的OnLoad事件方法
protected override void OnLoad(EventArgs e)
{
//测试
//Session.RemoveAll();
try
{
if (base.Session["user"] == null || base.Session["user"].ToString().Equals(""))
{
this.ClientScript.RegisterStartupScript(GetType(), "", "<script language=javascript>top.location.href='../../Login.aspx'</script>");
//Response.Write("<script language=javascript>top.location.href='../../Login.aspx'</script>");
}
else {
base.OnLoad(e);
}
}
catch (Exception)
{
throw;
}