0
我有一個標籤和兩個單選按鈕,我使用post方法並嘗試獲取單選按鈕的值,但我不知道它如何在asp.net中的下一頁獲取單選按鈕值
<div class="input-group">
<label>Enter Your Age</label>
<asp:TextBox ID="txtAge" runat="server"></asp:TextBox>
</div>
<div class="input-group">
<label>Select Your Gender</label>
<asp:RadioButton ID="RadioButton1" runat="server" GroupName="Gender" Text="Male" Checked="True" />
<asp:RadioButton ID="RadioButton2" runat="server" GroupName="Gender" Text="Female" />
</div>
<asp:Button ID="submit" runat="server" Text="Submit" PostBackUrl="~/receivePage.aspx" OnClick="submit_Click" />
,在我收到頁
String age = ((TextBox)PreviousPage.FindControl("txtAge")).Text;
這給了我年齡的價值,但如何獲取單選按鈕的價值?