protected override void OnInit(EventArgs e) { base.OnInit(e); bool login = false; User user = this.Session[Constant.SESSION_KEY_USER] as User; if (user != null) { if ((user.Authentication) || (user.Prerogative)) { login = true; } } if (!login) { this.Response.Redirect(string.Format("{0}Manages/Users/Logout.aspx", EnvironmentalMonitor.Support.Resource.Variable.VirtualRootPath)); } else { Type pageType = this.GetType(); UserBusiness business = new UserBusiness(); bool allow = business.VerifyPage(user, pageType); if (!allow) { this.Response.Redirect(string.Format("{0}Messages/VerifyFalse.aspx", EnvironmentalMonitor.Support.Resource.Variable.VirtualRootPath)); } } }