How can I block a form in .aspx
?
What happens is that when my button registers I can press again and can register twice as the image, that is, I want that when the warning comes out I only have the option to press accept.
This is my HTML:
<asp:Button ID="BtnnoConforme" runat="server" CssClass="btn btn-danger" style="font-weight:bold;margin-right: 5px;" Text="Registrar" OnClick="BtnnoConforme_Click" Font-Bold="True" />
This is my server code:
cmd.Parameters.Add("@fechacumplimientotarea", SqlDbType.Date); cmd.Parameters.Add("@ERROR", SqlDbType.Char, 500); cmd.Parameters["@fechacumplimientotarea"].Value = txtfechaoculta.Text; cmd.Parameters["@ERROR"].Direction = ParameterDirection.Output; cn.Open(); cmd.ExecuteNonQuery(); message = (string)cmd.Parameters["@ERROR"].Value; // lblErrorMsg.Text = message; System.Windows.Forms.MessageBox.Show(message, "..::Aviso del Sistema::.."); BtnnoConforme.Enabled = false; cn.Close(); Response.Redirect("FrmLogeo.aspx"); TxtMontoPagado.Text = ""; txtNumeroRecibo.Text = ""; TxtFecha.Text = ""; }
This is what my application shows: