如果我注销然后我无法再次登录就打开它请告诉我在asp.net中的代码 [英] If i do logout then i can not open it without login again please tell me code for this in asp.net
本文介绍了如果我注销然后我无法再次登录就打开它请告诉我在asp.net中的代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果我注销然后我无法再次登录而无法打开它请告诉我在asp.net中的代码
推荐答案
检查这个使用会话登录和注销系统。 [ ^ ]
在登录期间创建会话。
Session [Login] = textbox1.text;
afterLogin写代码
on pageload event
if(Session {Login] == null)
{
responce.redirect(你在这里登录);
}
退出事件时
将会话设置为null,然后才能退出申请。
会话[登录] = null;
create your session during login.
Session["Login"] = textbox1.text;
afterLogin write a code
on pageload event
if(Session{"Login"] == null)
{
responce.redirect("you login page here");
}
at logout event Set your session null before you can logout from the application.
Session["Login"] = null;
这篇关于如果我注销然后我无法再次登录就打开它请告诉我在asp.net中的代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文