protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { CargarDdls(); if (!string.IsNullOrEmpty(Request.QueryString.Get("isEdit"))) { int id = (int)Session["idGrupo"]; Noticia noticia = new Noticia() { Id = id }; using (NoticiaBusiness oNoticiaBussiness = new NoticiaBusiness()) { noticia = Noticia.getFromDataRow(oNoticiaBussiness.GetNoticiaById(noticia).Tables[0].Rows[0]); } this.txt_titulo.Text = noticia.Titulo; this.txt_cuerpo.Text = noticia.Cuerpo; this.txt_autor.Text = noticia.Autor; this.date_fecha.SelectedDate = noticia.Fecha; this.ddl_categorias.SelectedIndex = (int)noticia.IdCategoria; if (Request.QueryString.Get("isEdit").Equals("false")) { mostrar(false); } } } }