Confirm function in codebehind

Posted by Geetha on Stack Overflow See other posts from Stack Overflow or by Geetha
Published on 2010-05-07T07:03:22Z Indexed on 2010/05/07 8:48 UTC
Read the original article Hit count: 153

Filed under:
|
|

Hi All,

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.

code:

 protected void imbtnUpdate_Click(object sender, ImageClickEventArgs e)
 {

   // Database process     


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

 RegisterStartupScript("imbtnUpdate_Click", javaScript);
 }

© Stack Overflow or respective owner

Related posts about c#

Related posts about ASP.NET