Confirmation box with yes and No option, on drop down list's selected index change
<p>I am using Following code to show a confirmation box.</p>

<pre><code>protected void cmbPayerBucketMain_SelectedIndexChanged(object sender, EventArgs e)
{ 
    ClientScriptManager CSM = Page.ClientScript;
    if (!String.IsNullOrEmpty(hiddenF1.Value) || !String.IsNullOrEmpty(hiddenF2.Value))
    {
          CSM.RegisterClientScriptBlock(this.GetType(), "Confirm", "show();", true);
    }

   //Some Code       
}
</code></pre>

<p>And function show() as follows</p>

<pre><code>function show()
        (
            if(confirm('Chnages you made will be lost. Do you want to continue?'))
            { return true; }
             else
             { return false;
              }

              return 

        )
</code></pre>

<p>But irrespective of what option i have selected from confirmation box, it is executing the whole code. And after executing the whole event code it pops up msg box. How can I restrict the combo box for waiting for the response of confirmation box and execute the event code only when user select 'ok' (or 'yes' also suggest me the way to change the text of buttons in confirmation box. I want to make this OK to YES and CANCEL to NO).</p>
