First Item in dropdownlist doesn't fire SelectedIndexChanged at all

后端 未结 7 2194
盖世英雄少女心
盖世英雄少女心 2021-02-20 12:24

I have following simple code:

<%@ Page Language=\"C#\" AutoEventWireup=\"true\" CodeBehind=\"testForm.aspx.cs\" Inherits=\"Orbs.testForm\" %>

         


        
7条回答
  •  眼角桃花
    2021-02-20 12:35

    This question covers all the possibilities better than other posts out there, so I'm adding this explicit answer. In my case @Edyn's comment worked, even though the original problem already has this:

    Set ViewStateMode="Enabled" on the dropdown control itself.
    I also set it on the page declaration at the top of the page, just in case.

    This is .Net 4.0, so perhaps something was changed (but certainly not fixed nicely).

提交回复
热议问题