Continue execution of the code after alert message from clientside
<p>I've to send mail using webappplication.All works fine but i've to show a confirm message if attachments are not selected.In that confirm box when ok is clicked execution of the code should continue,when cancel button is clicked it should return.</p>

<p>This is my code</p>

<p>Code behind</p>

<pre><code> protected void btnSend_Click(object sender, EventArgs e)
  {
string str = "Are you sure, you want to proceed without attachment?";  
this.ClientScript.RegisterStartupScript(typeof(Page), "Popup", "ConfirmApproval('" + str + "');", true);
...Send mail code goes here
}
</code></pre>

<p>ASPX</p>

<pre><code>function ConfirmApproval(objMsg)
{
    if(confirm(objMsg))
    {
        alert("execute code.");
        return true;
    }    
    else
        return false;    
}
</code></pre>

<p>It works fine, ie when ok button is clicked an alert "execute code" is displaying.Instead of displaying alert i want to continue execution of the code.How will we do that from client side ???</p>
