protected void Page_Load(object sender, EventArgs e) { string id_usuario = Convert.ToString(Session["id_usuario"]); if (id_usuario == null || id_usuario == "") { Response.Redirect("default.aspx"); } else { if ((Convert.ToString(Session["rol"])) == "SuperAdministrador" || (Convert.ToString(Session["rol"])) == "Administrador") { HttpContext.Current.Response.Cache.SetAllowResponseInBrowserHistory(false); HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache); HttpContext.Current.Response.Cache.SetNoStore(); // Stop Caching in IE Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache); // Stop Caching in Firefox Response.Cache.SetNoStore(); Response.Cache.AppendCacheExtension("no-cache"); Response.Expires = 0; Response.Cache.SetExpires(DateTime.Now); Response.Cache.SetValidUntilExpires(true); CancelUnexpectedRePost(); if (!IsPostBack) { CADUsuario procesos = new CADUsuario(); procesos.CargarUsuarios(GVUsuarios); procesos.GenerarCheckBoxRol(rolesuser); //procesos.ConsultarUltimoIdUsuario(CodigoUsuario); Button2.CssClass = "btn btn-default"; Button2.Enabled = false; Button3.CssClass = "btn btn-default"; Button3.Enabled = false; } } else { Response.Redirect("default.aspx"); } } }