Problems with RadioButtonList

J

Jeff Petter

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;
}
}

}
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,218
Latest member
JolieDenha

Latest Threads

Top