We recently tested our products on IE10 and encountered a problem with the Asp: ImageButton server control button not launching in IE10 using the UpdatePanel. And below is the sample code:
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
Here is the content.
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="buttonSubmit" />
</Triggers>
</asp:UpdatePanel>
<br />
<br />
<asp:Button ID="buttonSubmit" runat="server" ToolTip="Submit" OnClick="buttonSubmit_Click" />
</form>
server side:
protected void buttonSubmit_Click(object sender, ImageClickEventArgs e)
{
ScriptManager.RegisterStartupScript(this, this.Page.GetType(), "alert", "alert('It works.')", true);
}
Here are two things that confused me: One problem only occurs when deploying to IIS and works fine when debugging on VS. Two of them, if I remove the top two br tags, the event will fire. Also, if I change ImageButton to Button, the event will also fire.
So, I do not know if I am missing something or misunderstood the life circle of the ImageButton and Button control. Any help would be greatly appreciated.
Test conditions: VS2010, IIS 7.5, IE10 (10.0.9200.16484)