Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP 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 July 2nd, 2004, 01:45 PM
Authorized User
 
Join Date: Jun 2003
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default check if radio button list selection made

Hi,

How do I check in the following that an item has actually been selected from radio button list rbWalking? If there has been no selection made, I want to set WalkingParm.Value = DBNull.Value

Dim WalkingParm As SqlParameter = cmd.Parameters.Add("@Walking", SqlDbType.Int, 4) WalkingParm.Direction = ParameterDirection.Input WalkingParm.Value = CInt(rbWalking.SelectedItem.Value)

Thanks,

John
 
Old July 3rd, 2004, 12:34 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp
Default

You can check it like this

dim bRadioButtonSelected

if(Request.Form("rbWalking")="") then
    bRadioButtonSelected=false
else
    bRadioButtonSelected=true
end if





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to automate selection of radio button using vb satish_k VB.NET 11 December 14th, 2006 11:28 AM
Form changes with radio button selection jekel13 PHP How-To 16 February 17th, 2006 04:56 PM
Display based on radio button selection Mekala Javascript 4 August 5th, 2004 11:36 PM
Radio Button activates a selection box in the page rnerilla JSP Basics 0 April 23rd, 2004 12:14 AM
Radio button activates a selection box in the page rnerilla PHP How-To 1 April 22nd, 2004 01:41 PM





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