2012-12-09 31 views
0

我有一個單選按鈕列表如下所示:選擇的項目做頁轉移

<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網頁,如果用戶選擇其一點擊「開始」按鈕後他們中的哪一個?

回答

0

把下面的代碼來改變的selectedIndex事件

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


if (RBjobSector.SelectedIndex == 1) 
    Reponse.Redirect("orange.aspx")