<asp:RadioButtonList ID="selectedYesNoQuestionBlock7" runat="server"
RepeatDirection="Horizontal" OnSelectedIndexChanged="Question7GotAnswered">
<asp:ListItem Text="Yes" Value="1"></asp:ListItem>
<asp:ListItem Text="No" Value="0"></asp:ListItem>
</asp:RadioButtonList>
....
<div id="btCreate" style="margin-left: 254px; margin-top: 10px;">
<asp:Button runat="server" Text="Categorize" ID="btCategorize" />
</div>
我想在选择列表项后立即提交无按钮。它有可能吗?
答案 0 :(得分:6)
为AutoPostBack="true"
RadioButtonList
<asp:RadioButtonList AutoPostBack="True" ID="selectedYesNoQuestionBlock7"
runat="server" RepeatDirection="Horizontal"
OnSelectedIndexChanged="Question7GotAnswered">
...
</asp:RadioButtonList>
答案 1 :(得分:1)
查看RadioButtonList
控件公开的事件,并将代码放入正确的事件处理程序中。我猜你也应该设置为控件的 True AutoPostBack
。