#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2004
    Posts
    3
    Rep Power
    0

    Talking Selecting a radio button (C#)


    Does anyone know how to select a ListItem based on a value returned from a query?

    For example, I have yes and no radiobuttons. If a query returns true, I want the yes button to be selected. If it returns false, the no button is selected.

    Any thoughts? If I could tackle these checkbox radiobutton issues I'd feel much better about aspx!

    Best wishes!
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Location
    Oregon
    Posts
    4
    Rep Power
    0
    Code:
    if (query returns true)
    {
         radioButtonYes.Checked = true;
         radioButtonNo.Checked = false;
    } else {
         radioButtonYes.Checked = false;
         radioButtonNo.Checked = true;
    }
    Is that what you mean?
    Last edited by nerdrocker; March 4th, 2004 at 04:38 PM.

IMN logo majestic logo threadwatch logo seochat tools logo