Phil,
It seems to be related to the Content-Length header and response encoding. Could you please try to post the response HTTP headers? It should look like this:
Cache-Control:private
Content-Length:245
Content-Type:text/html
Date:Mon, 30 Jul 2012 07:13:28 GMT
Server:Microsoft-IIS/6.0
X-AspNet-Version:2.0.50727
X-Powered-By:ASP.NET
I've also tried to make a few modifications of Modal.cs but these are blind guesses. The following changes have been made:
- page.Response.ClearContent() replaced by Response.Clear() and Response.ContentType
- page.Response.Buffer = true; added
You can also try disabling the Content-Length header.
public static void Close(Page page, object result)
{
page.Response.Clear();
page.Response.ContentType = "text/html";
page.Response.Buffer = true;
StringBuilder sb = new StringBuilder();
sb.Append("<html>");
sb.Append("<head>");
sb.Append("<script type='text/javascript'>");
sb.Append("if (parent && parent.DayPilot && parent.DayPilot.ModalStatic) {");
sb.Append("parent.DayPilot.ModalStatic.result = " +
DayPilot.Web.Ui.Json.SimpleJsonSerializer.Serialize(result) + ";");
sb.Append("if (parent.DayPilot.ModalStatic.hide) parent.DayPilot.ModalStatic.hide();");
sb.Append("}");
sb.Append("</script>");
sb.Append("</head>");
sb.Append("</html>");
string output = sb.ToString();
byte[] s = Encoding.UTF8.GetBytes(output);
page.Response.AddHeader("Content-Length", s.Length.ToString());
page.Response.Write(output);
page.Response.Flush();
page.Response.Close();
}
Please let me know if it didn't help.