protected void Page_Load(object sender, EventArgs e) { try { if (Session["GVT_IDRED"] == null) { try { Response.Redirect("~/SesionCaducadaModal.aspx", true); } catch (System.Threading.ThreadAbortException) { return; } } if (!Page.IsPostBack) { try { int nReferencia = int.Parse(Utilidades.decodpar(Request.QueryString["ref"].ToString())); string sEstado = Utilidades.decodpar(Request.QueryString["es"].ToString()); if (sEstado == "T" || sEstado == "N") { sProximaSituacion = "aprobada"; } else { sProximaSituacion = "aceptada"; } string[] aDatos = Regex.Split(CABECERAGV.ObtenerVisadores(nReferencia, sEstado), "@#@"); this.lblPersonas.InnerText = aDatos[0]; this.strTablaHTML = aDatos[1]; } catch (Exception ex) { sErrores += Errores.mostrarError("Error al cargar los datos", ex); } //1º Se indican (por este orden) la función a la que se va a devolver el resultado // y la función que va a acceder al servidor string cbRespuesta = Page.ClientScript.GetCallbackEventReference(this, "arg", "RespuestaCallBack", "context", false); string cbLlamada = "function RealizarCallBack(arg, context)" + "{" + cbRespuesta + ";" + "}"; //2º Se "registra" la función que va a acceder al servidor. Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "RealizarCallBack", cbLlamada, true); } } catch (Exception ex) { sErrores += Errores.mostrarError("Error al obtener los proyectos.", ex); } }