How to get the response from Confirm box in the code behind
<p>I am new to asp.net/C# .I am trying to create a web application.</p>

<p>Below is my requirement.</p>

<p>I am trying to save a record on button click. Before saving the record,I will be checking if that record exist in the database or not(in the code behind).If it exist,then I need to show an alert to the user as "Record already exist.Do you want to proceed?"When the user press 'Yes',I need to continue my save for the record in the code ,else I just need to exit the save process.</p>

<pre><code>//......code for checking the existence of the record    
if (check == true)
{            
    ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "script", " confirm('Record already exist.Do you want to proceed?');", true);
}
//
</code></pre>

<p>The above code shows me confirm box with 'OK' and 'Cancel' buttons.
My questions are </p>

<ol>
<li>how can I make it 'Yes' or 'No' in the confirm dialog?</li>
<li>After the user press 'Yes'/'No',how can I catch the response(yes/no),and proceed with  rest of my program?</li>
</ol>

<p>I have searched for this a lot.But couldn't get a proper answer.Please help me on this.</p>
