【发布时间】:2011-04-01 20:53:50
【问题描述】:
*Microsoft JScript 运行时错误:Sys.WebForms.PageRequestManagerParserErrorException:无法解析从服务器接收到的消息。此错误的常见原因是通过调用 Response.Write()、响应过滤器、HttpModules 或启用了服务器跟踪来修改响应。 详细信息:'�PNG
附近的解析错误'.*
如果我删除 <asp:updatepanel 一切正常
protected void gvFiles_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "Download")
{
byte[] byteArray = item.AttachContent.ToArray();
Response.Clear();
Response.AppendHeader("Content-Disposition", "attachment; filename=\"" + item.AttachFileName + "\"");
Response.AppendHeader("Content-Length", byteArray.Length.ToString());
Response.ContentType = "application/octet-stream";
Response.BinaryWrite(byteArray);
Response.End();
}
}
【问题讨论】:
标签: asp.net webforms updatepanel