private void validatePageAuthentication() { if (Request.Params["pagecode"] != null) { if (Request.Params["pagecode"] != "") { UserAuthentication userAuthentication = new UserAuthentication(); if (!userAuthentication.IsAuthorizeForThisPage(Context.User.Identity.Name, Request.Params["pagecode"].ToString())) { Response.Redirect("~/NoPermission.aspx"); } } } }