Click here to Skip to main content
15,888,527 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi there,

I wonder is anyone could be me out, i m have a webform with a radio list. The radiolist has two options YES and NO, i want it that if user selects YES it opens another page/webform.

Here is my html code:

XML
<asp:RadioButtonList ID="RadioButtonList1" runat="server" RepeatDirection="Horizontal"
                    Style="z-index: 190; left: 329px; position: absolute; top: 4px" ValidationGroup="WFGENPage">
                    <asp:ListItem>YES</asp:ListItem>
                    <asp:ListItem>NO</asp:ListItem>
                </asp:RadioButtonList>


Thanks in advance
Posted

Hi you can do ilke below
at first set aoutopostback property true

protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (RadioButtonList1.SelectedIndex == 0)
            {
                Response.Redirect("First.aspx");
            }
            else
            {
                Response.Redirect("Second.aspx");
            }
        }
 
Share this answer
 
v3
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900