views:

165

answers:

2

Hello All,

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.

A: 

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

Dan Diplo
Thanks for your suggestion. I checked out the traffic with Fiddler and it confirms what I saw - that the postback data from firefox contains all the form elements (and thus I am able to reconstruct my business object just fine) and from IE8 the postback only contains the LinkButton...
Just a wild guess, but have you validated your HTML and checked you have all the correct closing tags? Sometimes a missing closing tag can screw-up posted data.
Dan Diplo
+1  A: 

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