简体   繁体   中英

ASP.NET RadioButtonList events are not triggered

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?

runat="server"之后输入AutoPostBack="true" runat="server"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM