In ASP.NET, when the user clicks a button, I want to display a confirmation message box, which the following code does:
button.Attributes.Add(“onclick”, “return confirm(‘This will perform the task. Are you sure?’);”);
When the user clicks OK on the confirmation message box, I want to fire a click event. How do I do that? The click event method is attached to the button’s Click event but the method doesn’t fire. Thanks.
perhaps you should use
jQuery, it’s very simple to do what you want.