In asp button click event, We have to validate the data entered in UI and has to ask the confirmation before save the changes.
How can i do that in asp.net web application?
In asp button click event, We have to validate the data entered in UI and has to ask the confirmation before save the changes.
How can i do that in asp.net web application?
Similar to this question, and the answer is the same: http://stackoverflow.com/questions/1118295/confirm-message-in-asp-net
You can also place the appropriate attribute within the markup:
<asp:ImageButton ID="ImageButton1" runat="server" Text="Delete" ImageUrl="button.gif" AlternateText="Delete" OnClientClick='return confirm("Are you sure you want to delete this item?");'/>
As Jason mentions, I think trying to get validation prior to the dialog box could be tricky.