日期:2014-05-18 浏览次数:20741 次
<asp:RadioButtonList ID="rbl" runat="server" AutoPostBack="false" RepeatLayout="Table" OnSelectedIndexChanged="rbl_SelectedIndexChanged"> <asp:ListItem Value="1">A選項</asp:ListItem> <asp:ListItem Value="2">B選項</asp:ListItem> <asp:ListItem Value="3">C選項</asp:ListItem> </asp:RadioButtonList> public int sel; protected void rbl_SelectedIndexChanged(object sender, EventArgs e) { sel = Convert.ToInt32(rbl.SelectedItem.Value); swith(sel) { case 1: Response.Redirect("A.aspx"); break; case 2: Response.Redirect("B.aspx"); break; case 3: Response.Redirect("C.aspx"); break; default: break; } }