How to handle Yes No dialog that was pop-up using Javascript on button click
<p>I am having an update button on my from on clicking update i would like to prompt the user as Do you want to delimit the record with Yes and No buttons. If the user clicks on Yes i would like to execute the code which can delimit the record if not just update the record.</p>

<p>My sample code</p>

<pre><code>protected void btnUpdate1_Click(object sender, EventArgs e)
{
    EmpID = Convert.ToInt32(HiddenField1.Value);

    if (ID == 2)
    {
        oEmployeePersonalData.EmpID = EmpID;
        oEmployeePersonalData.PhoneNumberTypeID = ddlPhoneType.SelectedValue;
        oEmployeePersonalData.PhoneNumber = Convert.ToInt64(txtph1.Text);
        oEmployeePersonalData.EndDate = DateTime.Today.AddDays(-1);
</code></pre>

<p>//As per my requirement if i click on yes i would like to execute this code </p>

<pre><code>        if (oEmployeePersonalData.PhoneDetailUpdate())
        {
        }
</code></pre>

<p>// If No different code </p>
