Hi,
you can put another hidden button for the option No. say,
<asp:Button id="btnNo" runat="server" onclick="btnNo_Click" style="visibility:hidden;" />
And in the js code, when user clicks on no in confirm dialog, you have trigger the no button's click and return false to cancel current button's click.
See the Code below:
if(confirm("Click OK to Proceed")==true)
{
return true;
}
else
{
document.getElementById('btnNo').click();
return false;
}
And in code behind file you have to write click event handler for btnNo same way as btn1.
protected void btnNo_Click(object sender, EventArgs e)
{
lb1.Text = "You Pressed Cancel";
}
Hope this helps you :)