954,577 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Radiobuttonlist control - help!

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!

Shazbot
Newbie Poster
2 posts since Nov 2004
Reputation Points: 10
Solved Threads: 0
 

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

Shazbot
Newbie Poster
2 posts since Nov 2004
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You