你好所选RadioButton在构造函数,确定在C#
我有这样的构造:
public EmployeeCategorizationControl()
{
}
和许多单选按钮:
<asp:RadioButtonList ID="selectedYesNoQuestionBlock1" runat="server" RepeatDirection="Horizontal"
OnSelectedIndexChanged="Question1GotAnswered" AutoPostBack="true">
<asp:ListItem Text="Yes" Value="1"></asp:ListItem>
<asp:ListItem Text="No" Value="0"></asp:ListItem>
</asp:RadioButtonList>
<asp:RadioButtonList ID="selectedYesNoQuestionBlock2" runat="server" RepeatDirection="Horizontal"
AutoPostBack="true" OnSelectedIndexChanged="Question2GotAnswered">
<asp:ListItem Text="Yes" Value="1"></asp:ListItem>
<asp:ListItem Text="No" Value="0"></asp:ListItem>
</asp:RadioButtonList>
在我的构造函数,我怎么能确定哪个无线电按钮被选中?
在此先感谢!
退房[这个问题](http://stackoverflow.com/questions/378620/getting-selected-value-from-radiobuttonlist),它可能是一个重复的。你会想在你的构造函数中做类似的事情。希望这可以帮助。 – lhan