Working on a module created using the ASP.Net C# template from http://christoctemplate.codeplex.com. I would like to be able to display a "modal" error dialog when an error occurs, so I call the following code from the C# code behind to invoke the dnnAlert dialog:
private void DisplayErrorMessage(string key, string message)
{
System.Web.UI.ClientScriptManager csm = Page.ClientScript;
csm.RegisterStartupScript(typeof(System.Web.UI.Page), key, "$.dnn {title: 'Error', okText: 'OK', text: '" + message + "'});", true);
}
This works fine in my dev environment (local IIS) and displays exactly the modal dialog I'm looking for, but doesn't work at all on the hosted web server. As mostly a forms developer, I'm not sure how to troubleshoot this.
The module is set to "support partial page rendering", although I've tried it with it turned off and get the same result. DNN version is 06.01.05 in dev and 06.02.04 in production.
Any ideas?