protected void Page_Load(object sender, EventArgs e) { Response.Cache.SetNoStore(); if (!IsPostBack) { //llamamos la logica y el metodo L_Reporte_archivos operacion = new L_Reporte_archivos(); U_Reporte_archivos datos = new U_Reporte_archivos(); datos = operacion.verificar(Session["user"], Session["rolUser"]); //enviar desde la logica un codigo scrip Response.Write(datos.Url_pag); poblar_reporte(); } }//page_load
//----- verificar sesion ..... public U_Reporte_archivos verificar(object user, object rol) { U_Reporte_archivos datos = new U_Reporte_archivos(); if (user == null) { datos.Url_pag = "<script type='text/javascript'>window.location=\"inicio.aspx\"</script>"; } else { if (int.Parse((String)rol) != 1 && int.Parse((String)rol) != 2) { datos.Url_pag = "<script type='text/javascript'>window.location=\"inicio.aspx\"</script>"; } } return(datos); }