Problems with RadioButtonList

Discussion in 'ASP .Net' started by Jeff Petter, Oct 14, 2003.

  1. Jeff Petter

    Jeff Petter Guest

    I'm receiving some unexpected results from a RadioButtonList control on a web form. The list contains four options and depending upon which one is selected determines which page the user is directed to. The first two options also send a query string which maintains some state info, the last two are merely page redirects. First, I should mention that all of this works from my development machine. The first option (SelectedIndex == 0) does not pass the query string, though it does redirect, while the second option (SelectedIndex == 1) works fine. The last option ( SelectedIndex == 3) doesn't work, where the thrird (==2) works fine. Maybe I should be approaching this abother way, and if anyone has any ideas, I would certaily appreciate them.

    Thanks,
    Jeff

    Here's the code:

    private void btnGo_Click(object sender, System.EventArgs e)
    {
    if (rbl.SelectedIndex > -1)
    {
    switch (rbl.SelectedIndex)
    {
    case 0:
    Response.Redirect ("http://51101NY-NT-0726/dailyExceptions/addUser.aspx?Uname=" + pss_username, true);
    break;
    case 1:
    Response.Redirect ("http://51101ny-nt-0726/dailyExceptions/calExceptions.aspx?Uname=" + pss_username, true);
    break;
    case 2:
    Response.Redirect ("http://51101ny-nt-0726/SDS/contacts.htm");
    break;
    case 3:
    Response.Redirect ("http://51101ny-nt-0726/SDS/default.htm");
    break;
    default:
    break;
    }
    }

    }
    Jeff Petter, Oct 14, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ron
    Replies:
    2
    Views:
    762
    Sreejumon[MVP]
    Jul 1, 2003
  2. Leif
    Replies:
    1
    Views:
    414
    Helixpoint
    Jul 11, 2003
  3. Hamad
    Replies:
    1
    Views:
    825
  4. =?Utf-8?B?SGFycmlzIFJleW5vbGRz?=

    Problems with RadioButtonList

    =?Utf-8?B?SGFycmlzIFJleW5vbGRz?=, Aug 2, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    979
    Thomas Dodds
    Aug 3, 2004
  5. Michael Christensen

    Datagrid - dynamic radiobuttonlist problems...

    Michael Christensen, Oct 7, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    142
    Saravana [MVP]
    Oct 7, 2003
Loading...

Share This Page