IE8 中的 ASP.NET 回发问题

发布于 2024-09-14 01:29:28 字数 840 浏览 3 评论 0原文

我在本地的 ASP.NET 站点上工作,并且在 IE8 中遇到了 postbacks 问题。

我有一个带有 repeater 的页面,它构建了一个表,每行都有一个 LinkBut​​ton 用于删除该行。

FireFoxChrome 中,该按钮按预期工作 - 表单回发并且表单中的所有值都可供处理。在 IE8 中,表单回发,但表单集合为空,除了启动回发的按钮之外。

这是一个问题,因为

  1. 它很奇怪,我不明白,
  2. 我使用发回表单中的值来重建一些业务对象(我不将它们存储在 viewstatesession< /code> 但根据用户在表单中输入的值从头开始重建它们)。当我从 FF/Chrome 发回时,完整的表单就在那里(例如 Request.Form.AllKeys 有 60 个项目),我可以导出业务对象的值。当我从 IE 发回时,我的表单实际上是空的,并且我的重建代码失败(例如 Request.Form.AllKeys 只有 9 个项目,而不是预期的 60 个)。

我无法解释为什么 FF/ChromeIE 之间的 postback 表单集合的内容存在这种差异,并且会非常感谢这方面的任何见解/帮助。

我试图根据我的看法来分解这个问题 - 如果需要任何进一步的信息,请告诉我。感谢您的帮助。

I am working locally on an ASP.NET site and am experiencing problems with postbacks in IE8.

I have a page with a repeater that builds a table and each row has a LinkButton on it that is used to delete that row.

In FireFox and Chrome, the button works as expected - the forms posts back and all the values from the form are available for processing. In IE8, the form posts back but the forms collection is empty, except for the button that initiated the postback.

This is a problem because

  1. it's odd and I don't understand and
  2. I use the values from the posted back form to rebuild some business objects (I don't store them in viewstate or session but rebuild them from scratch based upon values input by user in form). When I post back from FF/Chrome, the full form is there (e.g. Request.Form.AllKeys has, say, 60 items) and I can derive the values for my business object. When I post back from IE, my form is practically empty and my rebuilding code fails (e.g. Request.Form.AllKeys has, say, only 9 items instead of the expected 60).

I am at a loss to explain why there is this difference in the contents of the form collection upon postback between FF/Chrome and IE and would greatly appreciate any insight/help in this regard.

I've tried to break the issue down as I see it - if any further info is required, please let me know. Thanks for your help.

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

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

发布评论

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

评论(3

征﹌骨岁月お 2024-09-21 01:29:28

你的问题听起来很不寻常,我从来没有遇到过。虽然我无法直接提供帮助,但我建议使用 Fiddler - Web 调试代理 来检查HTTP 流量作为诊断正在发生的情况的一种手段。引用一下,“Fiddler 是免费软件,几乎可以调试来自任何应用程序的流量,包括 Internet Explorer、Mozilla Firefox、Opera 等等……”

Your problem sounds unusual and is not something I've ever come across. Whilst I can't help directly, I'd recommend using Fiddler - Web Debugging Proxy to examine the HTTP traffic as a means to diagnosing what is going on. To quote, "Fiddler is freeware and can debug traffic from virtually any application, including Internet Explorer, Mozilla Firefox, Opera, and thousands more..."

何处潇湘 2024-09-21 01:29:28

解决了这个问题 - 原来我有一个表单嵌套在我的主页上的主表单中。删除它,一切都很好。

Solved this - turns out I had a form nested within the main form on my master page. Removed it and all is well.

别闹i 2024-09-21 01:29:28

我们在 Windows 2008 中的 IE8 中也遇到了类似的问题,解决方案与用户权限升级有关。

在 Windows 2008 机器上,我必须转到:

“开始”>“管理工具>本地安全策略>地方政策>安全选项

然后选择“用户帐户控制:内置管理员帐户的管理员批准模式”

选择启用并选择然后申请。

谢谢
阿努格拉

We had similar problem in IE8 in Windows 2008 and the solution was related to User Right escalations.

On Windows 2008 Machine I had to go to:

Start > administrative Tools > Local Security Policy > Local Policies > Security Option

then select "User Account Control : Admin Approval Mode for Build-in Administrator account"

Select Enable & then Apply.

Thanks
Anugrah

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