protected void Page_Load(object sender, EventArgs e) { if (Session["UsuarioID"] != null) { UsuarioEncuesta Usuario = new UsuarioEncuesta(); try { int UsuarioID = Int32.Parse(Session["UsuarioID"].ToString()); using (EncuestaServiceClient client = new EncuestaServiceClient()) { Usuario = client.ObtenerUsuario(UsuarioID); } Session["EsAdministrador"] = Usuario.EsAdministrador; if (!Page.IsPostBack) { txtCorreoElectronico.Text = Usuario.CorreoElectronico; txtPrimerNombre.Text = Usuario.PrimerNombre; txtSegundoNombre.Text = Usuario.SegundoNombre; txtPrimerApellido.Text = Usuario.PrimerApellido; txtSegundoApellido.Text = Usuario.SegundoApellido; txtNombreEntidad.Text = Usuario.NombreEntidad; txtNombreProyecto.Text = Usuario.NombreProyecto; txtCargoFuncionario.Text = Usuario.CargoFuncionario; } } catch (Exception ex) { } } else { Response.Redirect("~/Pages/Login.aspx"); } }