我的登录页面代码:
protected void Page_Load(object sender, EventArgs e)
{
Response.Cache.SetCacheability(HttpCacheability.NoCache);
if (!Session["userid"].Equals(String.Empty))
{
Response.Redirect("Welcome.aspx");
}
}
protected void CheckBox2_CheckedChanged(object sender, EventArgs e)
{
}
protected void LinkButton1_Click(object sender, EventArgs e)
{
Response.Redirect("userreg.aspx");
}
内容页面代码:
protected void Page_Load(object sender, EventArgs e)
{
if (Session["userid"].Equals(String.Empty))
{
Response.Redirect("Default.aspx");
}
Response.Cache.SetCacheability(HttpCacheability.NoCache);
}
protected void Button1_Click(object sender, EventArgs e)
{
Session.Abandon();
Response.Redirect("Default.aspx");
}