VB.net redirecting user to another page on selecting radio button

I have a to redirect a user to a different page on selection of a radio button. Im using vb.net. I have used the following code in my ascx page. As im using this in a user control how could i write the code in ascx  and get the required result without writing the code in the ascx.vb page.
Please advise with code.

Thanks
<asp:radiobutton id="PAgeARadio" groupname="Group1" 
                  checked="True" text="PageA" runat="Server"/>
               <asp:radiobutton id="PageBRadio" groupname="Group1"
                  text="PageB" runat="Server"/>

----------- on selection of PageB i have to redirect to the following page----
Pageb.aspx?<%=Request.QueryString()%>

Open in new window

nirisanAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

devhelperCommented:
Similar Post:
http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/Q_23381615.html

Add following lines in the codebehind file:


Protected Sub RadioButtonList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs)
        
       if not Page.IsPostBack then
       If Request.QueryString("MMP") = "True" Then
            Dim List As ListItem = RadioButtonList1.Items.FindByValue("Standard")
            List.Selected = True
        ElseIf Request.QueryString("STHP") = "True" Then
            Dim List As ListItem = RadioButtonList1.Items.FindByValue("Short")
            List.Selected = True
        ElseIf Request.QueryString("HSA") = "True" Then
            Dim List As ListItem = RadioButtonList1.Items.FindByValue("HSA")
            List.Selected = True
        End If
end if
end sub

Open in new window

0
nirisanAuthor Commented:
Thanks

But that will require a radiobuttonlist. Im using only radiobutton
0
masterpassCommented:
If you are OK with a javascript based solution, Try
<asp:RadioButton ID="PAgeARadio" GroupName="Group1" Checked="True" Text="PageA" runat="Server" onclick="javascript: window.location = 'http://www.google.com/';"/>
    <asp:RadioButton ID="PageBRadio" GroupName="Group1" Text="PageB" runat="Server" onclick="javascript: window.location = 'http://www.yahoo.com/';"/>

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
nirisanAuthor Commented:
good
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.