void SelectMedioComunicacion() { BPMedioComunicacion oBPMedioComunicacion = new BPMedioComunicacion(); ENTResponse oENTResponse = new ENTResponse(); ENTMedioComunicacion oENTMedioComunicacion = new ENTMedioComunicacion(); try { //Transacción oENTResponse = oBPMedioComunicacion.searchcatMedioComunicacion(oENTMedioComunicacion); //Validación if (oENTResponse.GeneratesException) { throw new Exception(oENTResponse.sErrorMessage); } if (oENTResponse.sMessage != "") { throw new Exception(oENTResponse.sMessage); } // Bind this.ddlMedioComunicacion.DataTextField = "Nombre"; this.ddlMedioComunicacion.DataValueField = "MedioComunicacionId"; this.ddlMedioComunicacion.DataSource = oENTResponse.dsResponse.Tables[1]; this.ddlMedioComunicacion.DataBind(); // Item extra this.ddlMedioComunicacion.Items.Insert(0, new ListItem("[Seleccione]", "0")); }catch (Exception ex){ ScriptManager.RegisterStartupScript(this.Page, this.GetType(), Convert.ToString(Guid.NewGuid()), "alert('" + gcJavascript.ClearText(ex.Message) + "');", true); } }