[英]can i use radio button list as Submit button?
i have: 我有:
<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>
i want to submit wothout button, just after selecting list item. 我想在选择列表项之后提交“ wothout”按钮。 is it possible and how??
有可能吗?如何?
Set AutoPostBack="true"
for your RadioButtonList
为
RadioButtonList
设置AutoPostBack="true"
<asp:RadioButtonList AutoPostBack="True" ID="selectedYesNoQuestionBlock7"
runat="server" RepeatDirection="Horizontal"
OnSelectedIndexChanged="Question7GotAnswered">
...
</asp:RadioButtonList>
Look at the event exposed by the RadioButtonList
control and put your code in the proper event handler. 查看
RadioButtonList
控件公开的事件,然后将代码放入适当的事件处理程序中。 I guess you should set to True AutoPostBack
of the control as well. 我想您也应该将控件设置为True
AutoPostBack
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.