在Internet Explorer上更新面板回发

时间:2014-06-10 10:23:14

标签: asp.net internet-explorer updatepanel postback

我有一个更新面板,里面有一个转发器和一个按钮。

点击按钮,它会过滤一些数据并绑定转发器。

在本地主机上一切正常。在服务器上,一切都在chrome,firefox,safari中完美运行,但在Internet Explorer中它可以完全回发。

我试着点击按钮

<Triggers>
    <asp:AsyncPostBackTrigger ControlID="btnupdaetd" />
</Triggers>

但没有效果。除了Internet Explorer之外,在每个浏览器上一切正常。

我甚至尝试过

 <meta http-equiv="X-UA-Compatible" content="IE=9" />

没有运气。

代码没有错,因为一切都在chrome,firefox,safari中完美运行。唯一的问题是服务器中的Internet Explorer。在本地,它也在Internet Explorer中工作。

1 个答案:

答案 0 :(得分:0)

尝试更改此

<asp:AsyncPostBackTrigger ControlID="btnupdaetd" />

<asp:AsyncPostBackTrigger ControlID="btnupdaetd" EventName="Click" />

并在您的asp按钮上添加ClientIDModeAutoID

<asp:Button runat="server" ID="btnupdaetd" ClientIDMode="AutoID" Text="Click" OnClick="btnupdaetd_Click"  />  

同样在您的更新面板中添加UpdateMode="Conditional",就像这样

<asp:UpdatePanel ID="upd1" runat="server" UpdateMode="Conditional">