Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
VB.NET 2002/2003 Basics For coders who are new to Visual Basic, working in .NET versions 2002 or 2003 (1.0 and 1.1).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET 2002/2003 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
  #1 (permalink)  
Old January 17th, 2005, 10:49 AM
Registered User
 
Join Date: Jan 2005
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to use the radio buttons?

Hi,

I have 2 radio buttons, radMale and radFemale. The problem is both radio buttons can be checked when I run it. I'm using Visual Studio.Net 2003. Can anyone advice me on the correct code? Thanks for the help!

the code which I had tried but don't work:

if radMale .checked = true
radFemale.checked = false
else
if radFemale.checked = true
radMale.checked = false



  #2 (permalink)  
Old January 18th, 2005, 12:29 PM
Friend of Wrox
 
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Where have you put that code? Which event?

Also, if you add your buttons to a group box, the group box will prevent more than 1 from being selected at a time.


Similar Threads
Thread Thread Starter Forum Replies Last Post
Radio Buttons and Calculations Student101 Java Basics 4 June 21st, 2009 11:02 AM
validation in radio buttons MunishBhatia ASP.NET 2.0 Professional 5 December 11th, 2007 11:15 AM
Radio buttons disappear JoeBob49 ASP.NET 2.0 Basics 2 November 27th, 2006 09:57 AM
Radio buttons over email??? morpheus Classic ASP Basics 5 April 20th, 2004 01:21 PM





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