简体   繁体   English

IE8中的ASP.NET回发问题

[英]ASP.NET Postback problems in IE8

I am working locally on an ASP.NET site and am experiencing problems with postbacks in IE8 . 我在ASP.NET网站上本地工作,并且在IE8遇到postbacks问题。

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. 我有一个带有repeater的页面,该页面构建一个表,并且每行上都有一个LinkButton ,用于删除该行。

In FireFox and Chrome , the button works as expected - the forms posts back and all the values from the form are available for processing. FireFoxChrome ,按钮可以按预期工作-表单回发,并且表单中的所有值都可以处理。 In IE8, the form posts back but the forms collection is empty, except for the button that initiated the postback . 在IE8中,除了发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). 我使用回发表单中的值来重建一些业务对象(我不将它们存储在viewstatesession而是根据用户在表单中输入的值从头开始重建它们)。 When I post back from FF/Chrome , the full form is there (eg Request.Form.AllKeys has, say, 60 items) and I can derive the values for my business object. 当我从FF/Chrome回邮件时,完整的表单就存在了(例如Request.Form.AllKeys有60个项目),我可以为我的业务对象导出值。 When I post back from IE, my form is practically empty and my rebuilding code fails (eg Request.Form.AllKeys has, say, only 9 items instead of the expected 60). 当我从IE发回邮件时,我的表单实际上是空的,并且重建代码失败(例如, Request.Form.AllKeys只有9个项目,而不是预期的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. 我无所适从地解释了为什么FF/ChromeIE之间在postback发时表单集合的内容之间存在差异,并且将不胜感激在这方面的任何见解/帮助。

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. 谢谢你的帮助。

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. 虽然我不能直接提供帮助,但我建议使用Fiddler-Web调试代理来检查HTTP流量,作为诊断正在发生的情况的一种方法。 To quote, "Fiddler is freeware and can debug traffic from virtually any application, including Internet Explorer, Mozilla Firefox, Opera, and thousands more..." 引用一句话,“ Fiddler是免费软件,可以调试来自几乎任何应用程序的流量,包括Internet Explorer,Mozilla Firefox,Opera以及数千种其他应用程序……”

Solved this - turns out I had a form nested within the main form on my master page. 解决了这个问题-事实证明,我的主页面上的主表单中嵌套了一个表单。 Removed it and all is well. 删除它,一切都很好。

We had similar problem in IE8 in Windows 2008 and the solution was related to User Right escalations. 我们在Windows 2008的IE8中遇到了类似的问题,解决方案与用户权限升级有关。

On Windows 2008 Machine I had to go to: 在Windows 2008 Machine上,我必须执行以下操作:

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 谢谢Anugrah

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM