RadioButtonList SelectedValue

Joined
May 7, 2006
Messages
1
Reaction score
0
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
 

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

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top