문제

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