asp.net Dropdownlist onselectedIndexChanged does not fire in IE 10

后端 未结 2 829
独厮守ぢ
独厮守ぢ 2020-12-21 08:11

I have simple (no ajax, no update panels) Asp.net application with a form which contains a server side DropdownList control. It works fine in all browsers except IE 10. Drop

2条回答
  •  独厮守ぢ
    2020-12-21 08:52

    The issue is ASP.NET browser definitions do not recognize IE10 so it defaults to a down-level definition, which has certain inconveniences, like that it does not support features like JavaScript.

    An alternative to the machine wide hotfix(s) or site level App_Browser solutions is to simply add Page.ClientTarget = "uplevel" to the Page_Init method in the code behind.

    Example:

    private void Page_Init(object sender, EventArgs e)
    {
        Page.ClientTarget = "uplevel";     
    }
    

提交回复
热议问题