Hello,
I have an ASP web application and in the C# code behind I want to present the user with a simple yes/no dialog box that gives them the opportunity to save a file that their input has created.
I've used a simple implementation of ClientScript.RegisterStartupScript elsewhere in the code to display simple messages, but I'm having trouble getting a yes/no type dialog to appear. I'm using this code:
try
{
ClientScript.RegisterStartupScript(this.GetType(), "Msg", "<script type=\"text/javascript\" language=\"javascript\">function showMsg(){return confirm(\"Do you want to save the WH XML file created?\");}</script>", true);
}
But the dialog never appears. Can someone suggest where my mistake is?