C# UpdatePanel 更新似乎可以在 Firefox 中运行,但不能在 IE 中运行

发布于 2024-08-19 13:20:20 字数 535 浏览 2 评论 0原文

我有一个页面,上面有几个更新面板。第一个有一个带有 gridview 的面板,该面板有一个事件来关闭面板并更新 UpdatePanel - 然后在第二个 updatepanel 中填充控件。它似乎在 Firefox 中工作正常,但在 IE 中,面板似乎不尊重visible=false。 gridview 不是数据绑定的,所以它不会显示,但仍然有一个空格。 Firefox 按照我的预期工作。

在 IE 中,显示的第二个更新面板中有一些按钮等。单击其中任何一个都会引发此错误。

Microsoft JScript 运行时错误:Sys.WebForms.PageRequestManagerServerErrorException:无效的回发或回调参数。使用配置或 <%@ Page EnableEventValidation="true" %> 启用事件验证在一个页面中。出于安全目的,此功能验证回发或回调事件的参数是否源自最初呈现它们的服务器控件。如果数据有效且符合预期,请使用 ClientScriptManager.RegisterForEventValidation 方法注册回发或回调数据以进行验证。

I've got a page with several Update Panels on it. The first has a panel with a gridview which has an event to close the panel and update the UpdatePanel - then populate a control in a second updatepanel. It seems to work fine in firefox but in IE the panel appears to not respect the visible=false. The gridview is not databound so it doesn't show but there is still a space. Firefox works as I would expect.

In IE the 2nd update panel which shows has a few buttons, etc in it. Clicking on any of these throws this error.

Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Invalid postback or callback argument. Event validation is enabled using in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

左秋 2024-08-26 13:20:20

在页面加载期间,代码正在更改不属于更新面板的单个标签的值,但在更新后对其进行了操作。简单的小标签:-/

我最终通过颠覆逐个版本地后退,直到找到中断并逐个检查更新的文件 - 找到我们添加那个小标签的地方。

During the page load the code was changing the value of a single label that was not part of the update panel but it was being manipulated after the update. Simple little label :-/

I ended up stepping back version by version through subversion until I found the break and inspected the updated files one by one - found the place where we added that little label.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文