Wrox Programmer Forums
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old November 22nd, 2006, 05:55 PM
Registered User
Join Date: Nov 2006
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.


Old November 22nd, 2006, 08:24 PM
Friend of Wrox
Join Date: Nov 2004
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.
Old November 27th, 2006, 09:57 AM
Registered User
Join Date: Nov 2006
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.

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

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.