【问题标题】:ASP.NET RadioButtonList events are not triggeredASP.NET RadioButtonList 事件未触发
【发布时间】:2015-10-20 20:25:33
【问题描述】:

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. 这是aspx代码:

<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# 代码(甚至没有开始,因此与内容无关)

protected void approvalYesNo_SelectedIndexChanged(object sender, EventArgs e)
    {

...            
    }

有什么想法吗?

【问题讨论】:

    标签: c# asp.net radiobuttonlist


    【解决方案1】:

    AutoPostBack="true"放在runat="server"之后

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-12-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-10-10
    • 2011-08-31
    相关资源
    最近更新 更多