asp.net怎么用一个按钮做到先清除session后跳页面
来源:百度知道 编辑:UC知道 时间:2024/06/06 18:59:13
我想做个注销按钮 然后可以重新登陆用户名 是要先清除session吧 请高手帮忙 谢谢
protected void Button1_Click(object sender, EventArgs e)
{
session["ID"]="";//清空session的值
Response.Redirect("要跳到后一个页面的名字");
}
session["xxxx"]=null;
Response.Redirect("default.aspx");
先 Session.Abandon() 后 Response.Redirect()