[急]一个奇怪的问题,希望高手们进来解决一下..

jiaoqiuge 2010-11-30 10:46:25

<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel runat="server">
<ContentTemplate>
这里面是2个DropDownList
</ContentTemplate>
</asp:UpdatePanel>



我有两个页面中都是通过他的onselectedindexchanged事件替换第二个DropDownList的值...

第一个页面就没有错误 正常执行,但是第二个页面的时候他就报:

Microsoft JScript 執行階段錯誤:
Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed.

那位高手能帮我处理一下啊?
...全文
136 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
kkbac 2010-11-30
  • 打赏
  • 举报
回复
看看这个能帮到你不.

在页面加了Updatepanel 后的弹出窗口写法:

string str = "<script>showModalDialog('MacroscopicalCharge.aspx','top=130, left=100, toolbar=no, menubar=no, scrollbars=yes, resizable=no,location=no, status=no','dialogwidth:" + n + "px;dialogheight:" + m + "px');</script>";

ScriptManager.RegisterStartupScript(ibCreateTable, this.GetType(), "aasfa", str, false);

str是将要弹出的页面,并为它设置一些参数,其中n和m是自定义的宽和高!

下面的一句话是真正的弹出,第一个参数是按钮的名称,第二个是类型,第三个是一个任意的Key值,第四个是Script脚本!

如果使用后页面第一次运行出现了这种错误的话:

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

可以在本页面的源页面内将EnableEventValidation="false" 就可以解决了!不知道有没有其它的办法!如果有请回帖!

普通客户端Javascript脚本弹出页面:

string str = "<script>showModalDialog('MacroscopicalCharge.aspx','top=130, left=100, toolbar=no, menubar=no, scrollbars=yes, resizable=no,location=no, status=no','dialogwidth:" + n + "px;dialogheight:" + m + "px');</script>";

this.ClientScript.RegisterStartupScript(this.GetType(), "aasfa", str, false);
jiaoqiuge 2010-11-30
  • 打赏
  • 举报
回复
这是神马?

人都那去了,别紧张赶紧来啊!!!...
jiaoqiuge 2010-11-30
  • 打赏
  • 举报
回复
没分了 哥哥们 进来解决一下 日后补给你!!!


jiaoqiuge 2010-11-30
  • 打赏
  • 举报
回复

<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel runat="server">
<ContentTemplate>
这里面是2个DropDownList
</ContentTemplate>
</asp:UpdatePanel>


只要我把ScriptManager 和 UpdatePanel 都删掉 就没错误了 ..

这样的话我选一次DropDownList 就提交一次.....

还有什么东西能躯体UpdatePanel的么
jiaoqiuge 2010-11-30
  • 打赏
  • 举报
回复
貌似没成功啊 哥们...
jiaoqiuge 2010-11-30
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 kkbac 的回复:]
看看这个能帮到你不.

在页面加了Updatepanel 后的弹出窗口写法:

string str = "<script>showModalDialog('MacroscopicalCharge.aspx','top=130, left=100, toolbar=no, menubar=no, scrollbars=yes, resizable=no,location=no, statu……
[/Quote]

我试试吧..

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧