944,181 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Unsolved
  • Views: 5946
  • ASP.NET RSS
Feb 3rd, 2005
0

Radiobuttonlist control - help!

Expand Post »
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!
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Shazbot is offline Offline
2 posts
since Nov 2004
Feb 3rd, 2005
0

Re: Radiobuttonlist control - help!

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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Shazbot is offline Offline
2 posts
since Nov 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: Page hangs or displays connection pooling max size error
Next Thread in ASP.NET Forum Timeline: .NET and external IP problems?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC