protected void RegistrarTipoProducto(object sender, EventArgs e) { ClientScript.RegisterStartupScript(GetType(), "alerta", "panel3();", true); try { tipopro.tipoproducto = tipoproducto.Value; if (tipopro.RegistrarTipoProducto(tipopro)) { textError.InnerHtml = "Tipo de Producto Registrado correctamente"; Alerta.CssClass = "alert alert-success"; Alerta.Visible = true; CargarTabletipoProducto(); cargardatosqueseusanentodolado(); } else { textError.InnerHtml = "Error al registrar el Tipo de Producto"; Alerta.CssClass = "alert alert-error"; Alerta.Visible = true; } } catch (Exception ex) { textError.InnerHtml = ex.Message; Alerta.CssClass = "alert alert-error"; Alerta.Visible = true; } }