johnt68 0 Junior Poster in Training

Hello :)

I have got to the stage where I get the user to make a choice from one radio button list, press submit and then they are taken to another page with a hyperlink that then takes them to their choice.

The problem that I have now is that I have four radio button lists in a table. I have tried to put the choices into if elses or a switch statement but I dont know how to refer to their place in the table !!! Any ideas please:-/

public partial class Links : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        namBackLab.Text = "Your name is " + Request.QueryString["textName"];

        switch ( RadioButtonList == "")//THIS BIT IS CONFUSING ME
        {
            case "thoughtProvokingReadsRbl"://First Radio Button List
                HyperLink1.NavigateUrl = Request.QueryString["thoughtProvokingReadsRbl"];
                break;


            case "filmsRbl"://Second Radio Button List
                HyperLink1.NavigateUrl = Request.QueryString["filmsRbl"];
                break;

            case "murderedMartyrsRbl"://Third Radio Button List
                HyperLink1.NavigateUrl = Request.QueryString["murderedMartyrsRbl"];
                break;

            case "beautifulPlacesRbl"://Fourth Radio Button List
                HyperLink1.NavigateUrl = Request.QueryString["beautifulPlacesRbl"];
                break;
        }
       
    }

}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.