I have the following code \[code\]protected void Button1_Click(object sender, EventArgs e){ string strScript = "if(confirm('Do you confirm?')){alert('OK'); }else{alert('cancel')}"; Page.ClientScript.RegisterClientScriptBlock(typeof(Page), "Confirmation", strScript, true);}protected void Button2_Click(object sender, EventArgs e){ string strScript = "if(confirm('Do you confirm?')){return false; }else{return true;}"; Page.ClientScript.RegisterClientScriptBlock(typeof(Page), "Confirmation", strScript, true);}\[/code\]Button1 is displaying the confirmation message and then based on my selection respective alert message is appearing.However when I click Button2 I do not even get the confirmation message.