Confirm function in codebehind
<p>I my application i am using ajax(Updatepanel).I am using the following code to show confirmation dialog box after finishing some update process in database. but it is not working for me.</p>

<p>Problem:</p>

<p>Confirmation box is not displaying.</p>

<p>code:</p>

<pre><code> protected void imbtnUpdate_Click(object sender, ImageClickEventArgs e)
 {

   // Database process     


 string javaScript = "&lt;script language=JavaScript&gt;\n " + "if(confirm('Do you want to update
the files?'))window.location.href = \"Upload.aspx?ID=" + ID +  
"&amp;pt=Gm&amp;page=Gms\"; else return false;\n" + "&lt;/script&gt;";

 RegisterStartupScript("imbtnUpdate_Click", javaScript);
 }
</code></pre>
