0

All my codes are just working fine in any browser like Chrome, Firefox, IE8 and IE9. However, it cant work in IE10, it is no any response when I click on the check box. The following is my html code:

<asp:CheckBox 
    ID="TermAcceptCheckBox" 
    runat="server" 
    visible="True" 
    oncheckedchanged="TermAcceptCheckBox_CheckedChanged" 
    AutoPostBack="true" />

here is the cs file code:

protected void TermAcceptCheckBox_CheckedChanged(object sender, EventArgs e) {
    if (TermAcceptCheckBox.Checked) {
        btnAccept.CssClass = "blue-button19";
        btnAccept.Focus();
        btnAccept.Enabled = true;
    } else {
        btnAccept.CssClass = "grey-button19";
        btnAccept.Enabled = false;
        btnReject.Focus();
    }
}

Anyone know what is my mistake? Thanks.

4

1 回答 1

0

如果这在 Internet Explorer 8 和 9 中工作,我认为这与 ASP.NET 在识别 Internet Explorer 10 时遇到的问题有关。Scott Hanselman 对此发表了博客,并在错误和修复:ASP 中提供了几个解决方案。 NET 无法检测 IE10 导致_doPostBack is undefinedJavaScript 错误

于 2013-04-30T03:50:52.263 回答