Radiobuttonlist control - help!

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Nov 2004
Posts: 2
Reputation: Shazbot is an unknown quantity at this point 
Solved Threads: 0
Shazbot Shazbot is offline Offline
Newbie Poster

Radiobuttonlist control - help!

 
0
  #1
Feb 3rd, 2005
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!
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 2
Reputation: Shazbot is an unknown quantity at this point 
Solved Threads: 0
Shazbot Shazbot is offline Offline
Newbie Poster

Re: Radiobuttonlist control - help!

 
0
  #2
Feb 3rd, 2005
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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for ASP.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC