User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 397,767 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,470 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 4170 | Replies: 1
Reply
Join Date: Nov 2004
Posts: 2
Reputation: Shazbot is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Shazbot Shazbot is offline Offline
Newbie Poster

Radiobuttonlist control - help!

  #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!
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Nov 2004
Posts: 2
Reputation: Shazbot is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Shazbot Shazbot is offline Offline
Newbie Poster

Re: Radiobuttonlist control - help!

  #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  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb ASP.NET Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the ASP.NET Forum

All times are GMT -4. The time now is 4:14 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC