I have a web form with some radiobuttonlist controls on it. My form will not submit unless I have selected at least one item on each radiobuttonlist controls.

Does anybody know how to set it so that my form will submit with only some of the radiobuttonlist controls selected?

When I submit without selecting one item for each radiobuttonlist control I get the error below:

----
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
----

I apologize for any confusion!

I believe I got it. I used the code below and it worked:

--------
If q4.SelectedValue <> "" Then
q4Str = q4.SelectedValue
Else
q4Str = "NA"
End If
--------

q4 is the ID of my radiobuttonlist control

q4Str is a string variable I am loading the selecteditem.value into

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.