1
I own that button:
<asp:Button ID="Button11" runat="server"
Text="Cancelar" CssClass="btn btn-danger btn-block"
OnClick="Button11_Click"
OnClientClick="javascript:return confirm('Deseja cancelar toda a venda?');"
UseSubmitBehavior="False" />
I need him to be UseSubmitBehavior="False"
, but when I put for false, it does not work the confirm
, he appears the alert
, but whether I click ok, or cancel, it does nothing, when the UseSubmitBehavior="true"
it works correctly, but if someone clicks enter, it clicks this button
, how can I proceed?
You gotta take that
UseSubmitBehavior="False"
and use another way, what you really want to do?– novic
I want that if you click enter anywhere in the form, the click of that button is not done, because this is what is occurring.
– Mariana
There’s something wrong with your form Ask him the question!
– novic
This happens because of Onclientclick="javascript:Return confirm('Want to cancel all sale?');"
– Mariana