protected void btn_guardarTTrai_Click(object sender, EventArgs e) { PlayaBC playa = new PlayaBC(); string caract = GenerarCadena(); if (!string.IsNullOrEmpty(caract)) { if (playa.AgregarCaracteristica(int.Parse(hf_idPlaya.Value), caract)) { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "modal", "alert('Caracteristicas Agregadas Correctamente');", true); } else { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "modal", "alert('Ocurrió un error al agregar caracteristicas. Intente nuevamente.');", true); } } else { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "modal", "alert('Debe seleccionar al menos una característica.');", true); } }