tags:

views:

51

answers:

1

hi folks

I need some jquery code in my application I have a button on the page and I want to handle it by jquery when the user click on it to show a confirmation dialog for example Are you sure? yes|no buttons but this is an asp.net button inside the updatepanel and in the other side I have some server side code to delete a record from database but my question is how I can handle both of them? server side and jquery inorder to when "yes" button clicked it runs server side and delete recorde from database and if the button is no it stop running ?

A: 

you need to use confirm javascript function

<asp:button id="fooBtn" runat="server" OnClientClick="return confirm("Are you sure?") />

Here is a link to confirm function.

Danil