我们有一个使用AJAX的Sharepoint解决方案。触发它的按钮位于更新面板内。如何解决错误:无法解析从服务器收到的消息
我们所做的一件事就是生成一个MS Word文档,然后在客户端打开它以便打印。
该文档发送到客户端的代码如下所示:
void OpenFileInWord(byte[] data)
{
Response.Clear();
Response.AddHeader("Content-Type", "application/msword");
Response.BinaryWrite(data);
Response.Flush();
Response.End();
}
,我们得到的是错误:
Message: 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 '<?mso-application pr'.
我们可以将文档保存在Sharepoint第一,然后从Sharepoint打开它,但我们不希望这样做。
'在你的榜样,你基本上试图改变标题为包括已经显示一个网页,其中不允许“。这是允许的,不需要一个单独的页面。 – 2012-12-28 07:17:05