Ajax加载下在进度,消息: Sys.WebForms.PageRequestManagerParserErrorException: 无法分析从服务器收到的

useruse useruse 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Test.aspx.cs" Inherits="Web.Test" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="IE=EmulateIE7" http-equiv="X-UA-Compatible">
<title>Untitled Page</title>
</head>
<body>
<form id="MyForm" runat="server"><div id="Main">

<div id="NowMenu">
<div id="NowButton">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Loading" />
<asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="Loading" />
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Button1" EventName="Click" />
<asp:AsyncPostBackTrigger ControlID="Button2" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
</div>
</div>
<asp:UpdateProgress ID="UpdateProgress2" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
<ProgressTemplate>
<div id="loader_container">
<div id="loader">
<div style="text-align:center;"><img alt="loading" style=" vertical-align:middle; margin-right:8px;" src="/Template/Image/loading.gif" />数据载入中,请稍后……</div>
<div id="loader_bg"><div id="progress"></div></div>
</div>
</div>
</ProgressTemplate>
</asp:UpdateProgress>

</div>
</form>
</body>
</html>




protected void Button1_Click(object sender, EventArgs e)
{
System.Threading.Thread.Sleep(3000);
}

public void Button2_Click(object sender, EventArgs e)
{
string Sql = " Where [StatUs]=0 And [State] !='D' And [Position] = 'C' ";
GetContent(Sql, DateTime.Now.AddDays(-1).ToString("yyyyMMdd"));
}

/// <summary>
/// 下载文件,文件名重写
/// </summary>
/// <param name="FileName">文件名</param>
/// <param name="FileContent">文件内容</param>
/// <returns>无</returns>
public static void DownloadExport(string FileName, string FileContent)
{
byte[] txtcontent = Encoding.Default.GetBytes(FileContent);
try
{
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.Charset = "utf-8";
HttpContext.Current.Response.Buffer = false;
HttpContext.Current.Response.ContentEncoding = System.Text.Encoding.UTF8;
HttpContext.Current.Response.AppendHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(System.Text.Encoding.UTF8.GetBytes(FileName)));
HttpContext.Current.Response.AppendHeader("Content-Length", txtcontent.Length.ToString());
HttpContext.Current.Response.ContentType = "application/octet-stream";
HttpContext.Current.Response.BinaryWrite(txtcontent);
HttpContext.Current.Response.Flush();
HttpContext.Current.Response.Close();
HttpContext.Current.Response.End();
}
catch (Exception ex)
{
throw (ex);
}
finally
{
txtcontent.Clone();
}
}



点击按钮会出现加载数据的层,可是结束后报错:
网页错误详细信息

消息: Sys.WebForms.PageRequestManagerParserErrorException: 无法分析从服务器收到的消息。之所以出现此错误,常见的原因是: 在通过调用 Response.Write() 修改响应时,将启用响应筛选器、HttpModule 或服务器跟踪。
详细信息: 分析附近的“====================”时出错。
行: 4723
字符: 21
代码: 0
URI: http://172.18.254.125:808/ScriptResource.axd?d=

请高手指点如何解决!!
...全文

相关推荐

RDLC报表分页报错:Sys.WebForms.PageRequestManagerParserErrorException:未能分析从服务器收到的消息...如何解决?| 提供多种解决方案,亲测有效!

🏆本文收录于 《全栈Bug调优(实战版)》 专栏,该专栏专注于分享我在真实项目开发中遇到的各类疑难Bug及其深层成因,并系统提供高效、可复现的解决思路和实操方案。无论你是刚入行的新手开发者,还是拥有多年项目经验的资深工程师,本专栏都将为你提供一条系统化、高质量的问题排查与优化路径,助力你加速成长,攻克技术壁垒,迈向技术价值最大化与职业发展的更高峰🚀!

bug菌¹

Microsoft.WinDbg-1.2610.1001.0-x64

Microsoft.WinDbg-1.2610.1001.0-x64

CSUer丶夜神゛

Claude 代码超强能力:核心技能库

Superpowers 是一套面向你的编码智能体的完整软件开发方法论,由一组可组合技能和若干初始指令构建而成,用以确保智能体真正使用这些技能。

yiersansiwu123d

PDF发票内容提取排版并结构化导出xlsx/cvs嵌入式ptyhon

【本地发票提取工具】 核心优势:不依赖传统粗糙 OCR,基于文字排版结构进行精准提取。仅“税网”下载及税网邮件发送的原版 PDF 发票(开票软件发送的不太支持)能实现开票明细级的秒级本地提取,告别只能提抬头、总额的尴尬。 可免费试用 3 天! 【用前须知】 去微软官网下载VC_redist.x64.exe运行修复运行库(必要的前置操作),之后再解压本工具rar,运行本exe即可。 VC_redist.x64.exe官网永久下载地址 https://learn.microsoft.com/zh-cn/cpp/windows/latest-supported-vc-redist 【安全须知】 个人开发暂未做代码签名,杀软可能会有误报拦截。遇到拦截请在杀软中添加信任/白名单即可。 VirusTotal扫描结果 2/61,主流杀软均通过,个别引擎因无签名误报。官网 virustotal.com 点击页面中间显眼的 “Choose file”(选择文件)按钮上传扫描。

信人远邮168

Flask校园二手交易平台课设

这是一份基于 Flask + SQLite 的校园二手交易平台课程设计完整资料,包含实验报告(Markdown、HTML、PDF 三种格式)、全部 Python 源码、8 个 Jinja2 页面模板、5 张运行截图、答辩 PPT。学生注册账号后发布闲置物品,同校同学按分类翻、按关键词搜,看中了在详情页留言咨询,管理员能下架违规商品。不接支付不做物流,买卖双方线下交易,平台只负责信息展示和沟通,一个学期课设能做完。 系统功能:用户注册登录登出,session 维持登录态;发布商品填标题、描述、价格、选六类分类,图片可选上传不强制;首页卡片网格展示在售商品,顶部搜索框按标题描述模糊匹配,下方分类按钮筛选,搜索和筛选可组合;商品详情页展示大图、完整描述、卖家昵称,登录用户能留言咨询;我的发布页能看自己挂过的所有商品并删除;管理员后台能看全部商品,一键下架违规品或恢复在售。 几个值得参考的实现点:密码用 Werkzeug 哈希加盐存储;登录接口不区分"用户不存在"和"密码错误",防枚举用户名;图片上传限制后缀和 2MB,文件名随机串重命名,防覆盖和传脚本;分类和搜索筛选组合用动态拼 SQL;首次启动自动建表写管理员账号;Bootstrap 5 栅格,手机浏览器也能看。 适合正在做 Web 课程设计、Python 后端入门的学生,以及想学习"Flask 蓝图 + SQLite + 登录鉴权 + 文件上传"完整小项目的自学者。拿到手后 cd src,pip install -r requirements.txt,python app.py,浏览器开 http://127.0.0.1:5000 即可,管理员账号 admin/admin123,普通用户自行注册。

小鹿( ﹡ˆoˆ﹡ )
评论 8
收藏 已收藏
分享
返回顶部
useruse
Ajax 52,778 成员 25,334 内容