Вопрос

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?

Это было полезно?

Решение

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

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top