It is a bad practice to mix Windows Forms and ASP.Net. They don't work alike and nowdays there are ways to program Web Pages to make them behave almost entirely or even better than a Windows Form (HTML5, jQuery, AJAX, or even with plugins sucha as JavaFX, Flash and Silverlight).
A confirmation can be fetched with a simple javascript "confirm". It works like a Yes/No MessageBox:
<asp:button id="btnConfirm" runat="server" onclientclick="return confirm('Confirm action?');" onclick="btnConfirm_Click" />
The button configuration above will first throw a confirm box, and catch the response on c# or VB for the method btnConfirm_Click which you need to have in advance.
Your current aproach will display erratic behavior such as what you're getting, and will be incompatible with all non-Windows devices (Apple, Android, etc.).