JAVA Script confirmation message on button click

HI, some times we stuck that how to show confirmation message to do a server side event for example to delete record message should be

“Are you sure you want to delete?”

so the simplest option is:

Code Snippet
  1. <asp:Button ID="Button1" runat="server" OnClientClick="return confirm('Are you sure you want to delete?');"
  2.             onclick="Button1_Click" Text="Delete" />

A small tip :)

Thanks…

2 Comments

Comments have been disabled for this content.