Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 22nd, 2006, 05:55 PM
Registered User
Join Date: Nov 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Radio buttons disappear

Let's say I have 3 buttons called Y/N/NA with values if 1,2,3 respectively. I put them in a group so they are mutually exclusive. I want to bind the value coming out of the group to a field in the database. In VBA this value would be a property of the option group - what is it here? Also, when a value is returned from the database, the only button showing is the selected one, the rest disappear. Why?

Any help is appreciated. Thanks.


Reply With Quote
  #2 (permalink)  
Old November 22nd, 2006, 08:24 PM
Friend of Wrox
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts

This is the way the inet system is.

Name the buttons with distinct names, and look for all threee in the Form collection. The only one present is the one that has been clicked.

A checkbox or radio button that is unchecked is not contained in the values that are returned to the server.
Reply With Quote
  #3 (permalink)  
Old November 27th, 2006, 09:57 AM
Registered User
Join Date: Nov 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

OK, thanks. I see now how to read the value from the radio button group on the client side. The part about no values coming back from the server for the other buttons makes sense, but doesn't deal with the question of how to make those buttons appear. I'm working on a survey type form, so it is essential that all choices always appear. I've looked through several books by Wrox, Apress, etc and can't find much dealing with exactly this problem.

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Buttons disappear from dialog form j0hnyager Visual Basic 2005 Basics 2 March 3rd, 2008 02:24 PM
validation in radio buttons MunishBhatia ASP.NET 2.0 Professional 5 December 11th, 2007 11:15 AM
How to use the radio buttons? ben_VB VB.NET 2002/2003 Basics 1 January 18th, 2005 12:29 PM

All times are GMT -4. The time now is 10:19 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.