日期:2014-05-17 浏览次数:20516 次
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();
}
}
}
------解决方案--------------------
具体怎么验证的实现方式很多,但是必须保证每次请求都要通过验证