Any advice or sample code on how to successfully use the new Export() method for DayPilotMonth? I am getting the error:
Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.
Details: Error parsing near 'PNG
'.
Here is my code:
protected void ButtonExport_Click(object sender, EventArgs e)
{
Response.Clear();
Response.ContentType = "image/png";
Response.AddHeader("content-disposition", "attachment;filename=EventCalendar.png");
MemoryStream img = dpmCalendar.Export(ImageFormat.Png);
img.WriteTo(Response.OutputStream);
Response.End();
}
I have tried a number of different image formats, and also played with different charsets and encodings on the Response, but the error persists. I have been unable to find any examples for the DayPilotMonth.Export method.