会话结束后,如何重定向登录表单页面 [英] how can i redirect the page for login form when session is over
本文介绍了会话结束后,如何重定向登录表单页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有人可以告诉我该怎么做吗?
can someone tell me how can do this???
推荐答案
在母版页中编写此代码.
write this code in Masterpage.
if (Session["UserName"] != null)
{
//Retrieving UserName from Session
lblWelcome.Text = "Welcome : " + Session["UserName"];
}
else
{
Response.Redirect("Login.aspx");
}
实现表单身份验证.
http://support.microsoft.com/kb/301240 [ ^ ]
表单身份验证
Implement form authentication.
http://support.microsoft.com/kb/301240[^]
Form Authentication
这篇关于会话结束后,如何重定向登录表单页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文