RadioButton列表中的选定项目进行页面传输

时间:2012-12-09 14:26:38

标签: radiobuttonlist

我有一个单选按钮列表如下:

<asp:RadioButtonList ID="RBjobSector" runat="server" style="font-size: medium">
    <asp:ListItem>apple</asp:ListItem>
    <asp:ListItem>orange</asp:ListItem>
</asp:RadioButtonList>

如果用户在点击“开始”按钮后选择其中任何一个,如何引导用户转到apple.aspx或orange.aspx页面?

1 个答案:

答案 0 :(得分:0)

将以下代码放入selectedIndex已更改事件

if (RBjobSector.SelectedIndex == 0)
   Reponse.Redirect("apple.aspx")


if (RBjobSector.SelectedIndex == 1)
   Reponse.Redirect("orange.aspx")
相关问题