ASP.NET Postback problems in IE8

2019-06-08 20:38发布

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.

3条回答
不美不萌又怎样
2楼-- · 2019-06-08 21:13

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..."

查看更多
唯我独甜
3楼-- · 2019-06-08 21:31

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

查看更多
手持菜刀,她持情操
4楼-- · 2019-06-08 21:34

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

查看更多
登录 后发表回答