In this article, I will explain how you can display a confirmation dialog from server side in ASP.NET. Suppose you are performing an operation and wish to present the user with a confirmation dialog. Using this code, the user will be shown a confirmation dialog box with "Yes" and "No" buttons. Then on the server side, you can test which button was clicked and take action accordingly.
Default.aspx
Default.aspx.cs
This code is fully tested. If you still face any trouble using this code, feel free to get in touch with me through the comments section below or the contact page.
what is linkbtnPerformAction control here
Hi Vinod, I apologize for the delayed reply. I was recovering from COVID.
linkbtnPerformAction is the ID of the hidden link button that you can find in the code of the Default.aspx page above.
Thanks!