Solved

How do I create a Confirmation Dialog for DELETE button in ASP.NET (C#) web application?

Posted on 2010-08-26
2
459 Views
Last Modified: 2012-05-10
Can you please tell me how can I create a confirmation dialog for DELETE button? When user clicks DELETE, it should prompt for confirmation and if user clicks YES, record will be deleted and if clicks NO, operation will be cancelled.

Environment: Visual Studio 2008, C#.
0
Comment
Question by:pawar_deepak
2 Comments
 
LVL 5

Accepted Solution

by:
roxviper earned 500 total points
ID: 33532737
<asp:Button ID="btnDelete"  ToolTip="Delete" runat="server" OnClientClick="return confirm('Are you sure you want to delete this account?');"  OnClick="btnDelete_Click"  />
0
 
LVL 18

Expert Comment

by:Richard Lee
ID: 33532770
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

838 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question