protected override void OnLoad(EventArgs e) { if (!IsLogin || OnlineUser.GetOnlineUser(CurrentUser.UserID) == null) { Response.Write("<script type=\"text/javascript\">top.location.href = '/View/Account/Login.aspx';</script>"); return; } base.OnLoad(e); }
public const string PartnerLoginUrl = "/partnerLogin.aspx"; //经销商登录入口 public virtual void ProcessRequest(HttpContext context) { Request = context.Request; Response = context.Response; Session = context.Session; Server = context.Server; pagingParm = new PagingParm(context); //排除LoginHandler、、SafeHandler、UserRegister string url = Request.FilePath.ToLower(); if (url.IndexOf("loginhandler") > -1 || url.IndexOf("partnetloginhandler") > -1 || url.IndexOf("verifycodehanler") > -1 || url.IndexOf("safecodehanler") > -1) { return; } if (CurrentUser == null || OnlineUser.GetOnlineUser(CurrentUser.UserID) == null) { Response.Write("TimeOut"); Response.End(); //Response.Write("<script>top.window.location.href = '/login.aspx'</script>"); //Response.End(); } }