private bool imagenExiste(string imagen) { nBanner unBannerN = new nBanner(); return unBannerN.Buscar_Uno(imagen); }
protected void grdBanners_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Editar") { string sError = ""; try { if (int.Parse(e.CommandArgument.ToString()) > 0) { nBanner unBannerN = new nBanner(); oBanner unBannerO = new oBanner(); sError = unBannerN.Buscar_Uno(int.Parse(e.CommandArgument.ToString()), ref unBannerO); hId.Value = unBannerO.id.ToString(); txtNombreEditar.Text = unBannerO.nombre; imgMuestraEditar.ImageUrl = unBannerO.imagen; chkActivoEditar.Checked = unBannerO.activo; ddlColumnaEditar.SelectedValue = unBannerO.columna; txtLinkEditar.Text = unBannerO.link; formModificar.Visible = true; //HtmlGenericControl formModificar = new HtmlGenericControl("formModificar"); //formModificar.FindControl(""); } } catch (Exception ex) { Response.Write("<script type='text/javascript' language='javascript'> alert('" + sError + "');</script>"); } } }