请问怎么样判断一个用户是否已经登陆!??? 请问怎么样判断一个用户是否已经登陆!??? 其中用户的唯一标识UId 存在Session["UId"]里面------------------------------------------谢谢各位大哥指教!!!!!!!! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 string userID =(Session["UId"]!=null)?Session["UId"].ToString():"" ;if( userID.length == 0) { //没有登录处理}else{ //登录后处理} 如果Session["UId"]不为空就已经登陆了,空的话就未登陆 if(this.Session["logid"]==null){this.Response.Writ("<scriptlanguage='javascript'>top.location.href='../index.aspx';</script>");this.Response.End(); //this.Response.Redirect("../index.aspx");}//如果是派出所用户,不能查看缴费管理if(this.Session["level"].ToString()=="2"){// this.Response.Write("<script language='javascript'>top.location.href='../index.aspx';</script>");this.Response.Redirect("error.aspx");this.Response.End();} 动软生成器的使用问题 [.NET技术 ASP.NET] Repeater内一个linkbutton如何控制Repeater外的一个table的隐藏与显示 ASP.NET 的问题 dataset如果批量导出excel?哪种方法比较好 asp.net网站不定时出错 jmail pop3怎么设置可以接受 SSL加密的邮箱里的邮件呢! 在线等 网页中播放音乐的问题 一个自定义控件的简单问题 框架问题 正则的效率? SQLHELPER问题 请问怎么样判断一个用户是否已经登陆!???
if( userID.length == 0)
{
//没有登录处理
}
else
{
//登录后处理
}
{
this.Response.Writ("<scriptlanguage='javascript'>top.location.href='../index.aspx';</script>");
this.Response.End();
//this.Response.Redirect("../index.aspx");
}
//如果是派出所用户,不能查看缴费管理
if(this.Session["level"].ToString()=="2")
{
// this.Response.Write("<script language='javascript'>top.location.href='../index.aspx';</script>");
this.Response.Redirect("error.aspx");
this.Response.End();
}