Write the following code in your HTML Page.
<script language="javascript" type="text/javascript">
function window.confirm(str)
{
execScript('n = msgbox("'+str+'","4132")', "vbscript");
return(n == 6);
}
</script>
Call the function from the onClientClick event of your button
<asp:Button ID="btnOk" runat="server" OnClientClick="javascript:return confirm('Are you sure to proceed?');" OnClick="btnOk_Click" Text="OK" />
Write the btnOk_Click event in your server side code
protected void btnOk_Click(object sender, EventArgs e)
{
// your code
}
Now your confirmation dialog will show Yes/No instead of Ok/Cancel. If you click Yes, the control will go to the server side method and if you click No, the server side code will not execute.
<<< removed link >>>