0

I want a confirm prompt on this button type. There is no OnClientClick for this button type and I need an alternative method on how.

     <asp:ButtonField ButtonType="Image" ImageUrl="Content/Images/Edit.png" CommandName="EditRow" Visible="true" CausesValidation="false" ItemStyle-CssClass="smallColumn" ControlStyle-Width="15" ControlStyle-Height="15" />

Is there a way I can use Jquery to intercept the button click; prompt the user then if the user says no prevent button click?

1 Answers1

0

Yes, you can attach a click handler using jQuery:

$("#YOUR_BTN_ID").click(function() { if(confirm('YOUR REQUEST HERE') { doSomething(); }));
Laserson
  • 535
  • 1
  • 8
  • 21