日期:2014-05-17 浏览次数:20390 次
public class ManagePage:System.Web.UI.Page
{
public ManagePage()
{
this.Load+=new EventHandler(ManagePage_Load);
}
public void ManagePage_Load(object sender, EventArgs e)
{
//如果Session为Null
if (Session["AdminName"] == null)
{
Response.Write(" <script type='text/javascript'>parent.location.href='login.aspx'</script>");
Response.End();
}
}
}
//继承ManagePage
public partial class admin_center : ManagePage
{
protected void Page_Load(object sender, EventArgs e)
{
}
}