Domanda

I have a RadioButtonList in my site and it has a OnTextChanged and OnSelectedIndexChanged events that for an unknown reason do not fire when the selection is changed. Here is the aspx code:

<asp:RadioButtonList ID="approvalYesNo" runat="server" OnTextChanged="approvalYesNo_SelectedIndexChanged" OnSelectedIndexChanged="approvalYesNo_SelectedIndexChanged">
    <asp:ListItem>No need</asp:ListItem>
    <asp:ListItem>Required</asp:ListItem>
    </asp:RadioButtonList>

C# Code (not even starting so it has nothing to do with its content)

protected void approvalYesNo_SelectedIndexChanged(object sender, EventArgs e)
    {

...            
    }

any ideas what is wrong here?

È stato utile?

Soluzione

put AutoPostBack="true" after runat="server"

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top