RadioButtonList SelectedValue

Discussion in '.NET' started by thinkmast, May 7, 2006.

  1. thinkmast

    thinkmast

    Joined:
    May 7, 2006
    Messages:
    1
    Likes Received:
    0
    Location:
    Atlanta,GA
    Hello All:

    i am writing a .NET survey application using C#. There are a series of questions on the webpage with a radiobuttonlist for each question.

    I am now trying to get the values from the database already to display on the radiobuttonlist..i was successful so far by using the code
    rbl_name.SelectedValue=Convert.ToString(sql_select.Parameters["@rbl_name"].Value)

    BUT, if the value in the database is NULL, it is giving an error.

    I want NO radiobutton to be selected IF the value is NULL in the database.

    Thanks,
    Vijay
     
    thinkmast, May 7, 2006
    #1
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.