Microsoft JScript错误 [英] Microsoft jscript error

查看:75
本文介绍了Microsoft JScript错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我单击了asp:Updatepanel中存在的btnDownloadWebConnector,并且在btnDownloadWebConnector_Click的情况下,我正在调用一个类似于以下
的函数 CodeBehind

Hi all,
I am clicking btnDownloadWebConnector that was present inside asp:Updatepanel and in event of btnDownloadWebConnector_Click i am calling one function like the following
CodeBehind

protected void btnDownloadWebConnector_Click(object sender, EventArgs e)
{
    string filename = Server.MapPath(@"~/ZSLWebConnect/ZSLWebConnectorSetup.msi");
    FileInfo fileToDownload = new FileInfo(filename);
    if (fileToDownload.Exists)
        {
        Response.ClearContent();
        Response.AddHeader("Content-Disposition", "attachment; filename=" + fileToDownload.Name);
        Response.AddHeader("Content-Length", fileToDownload.Length.ToString());
        Response.ContentType = "application/octet-stream";
        Response.TransmitFile(fileToDownload.FullName.ToString()); 
        Response.End();
        }
   }



单击执行上面的代码后,我得到了javascript错误:"Microsoft JScript运行时错误:Sys.WebForms.PageRequestManagerParserErrorException:无法解析从服务器收到的消息.此错误的常见原因是通过调用修改响应时到Response.Write(),响应筛选器,HttpModules或服务器跟踪已启用.
详细信息:解析"附近的错误.
谁能帮我解决以上错误吗?
预先感谢,
Bala.



After clicking the executing the above code i am getting the javascript 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 ''''.
Can anyone please help me how to solve the above error?
Thanks in advance,
Bala.

推荐答案

这是一个常见错误,请查找类似的线程此博客条目 [
This is a common mistake, look for similar threads here[^].

Have a look at this blog entry[^] for reasons and resolutions.


这篇关于Microsoft JScript错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆