在IE8 ASP.NET回发问题 [英] ASP.NET Postback problems in IE8
问题描述
我在一个 ASP.NET
网站在本地工作,并正在经历着<$ C $与回传
问题C> IE8 。
I am working locally on an ASP.NET
site and am experiencing problems with postbacks
in IE8
.
我有一个转发
是建立一个表,每一行都有一个的LinkButton
它是一个网页用于删除该行。
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.
在火狐
和铬
,按钮按预期工作 - 形式的帖子后面,所有的值从形式可用于处理。在IE8中,表单发送回来,但形式集合是空的,除了发起回传按钮
。
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
.
这是一个问题,因为
- 这是奇怪的,我不理解和
- 我用从调回表单中的值来重建一些业务对象(我不把它们存储在
视图状态
或会议
但用户在表单根据输入的数值从头开始重建他们)。当我从发布FF / Chrome浏览器
回,满形式存在(如Request.Form.AllKeys有,比方说,60项),我可以为我的企业得到的值目的。当我从后回到IE浏览器,我的状态几乎是空的,我的重建code失败(如Request.Form.AllKeys
的,说,只有9个项目,而不是预期的60)。
- it's odd and I don't understand and
- I use the values from the posted back form to rebuild some business objects (I don't store them in
viewstate
orsession
but rebuild them from scratch based upon values input by user in form). When I post back fromFF/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).
我在无法解释为什么会出现在表单收集的内容在回发
FF / Chrome浏览器$之间的这种差异C $ C>和
IE
键,将大大AP preciate在这方面的任何见解/帮助。
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.
推荐答案
解决了这个 - 原来我有嵌套在主模内我的主人页面上的表单。删除它,一切都很好。
Solved this - turns out I had a form nested within the main form on my master page. Removed it and all is well.
这篇关于在IE8 ASP.NET回发问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!