Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional 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 June 24th, 2004, 09:22 AM
Authorized User
 
Join Date: May 2004
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default Assigning a value to a Radio Button List


I need to assign a radio button list with a value passed through a session variable. This is the syntax I'm using:

radOwner.Items(0).Selected = True
radOwner.selectedItem.value = context.items("Owner")


Something is obviously wrong because when I try to assign the "Owner" value to radOwner it doesn't work.

Does anyone know how is this usually done.

 
Old June 24th, 2004, 09:33 AM
Authorized User
 
Join Date: Jan 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

 RadioButtonList1.SelectedItem.Value = Session.Contents.Item("Owner")


or


RadioButtonList1.Items(0).Value = Session.Contents.Item("Owner")


 
Old June 24th, 2004, 01:56 PM
Authorized User
 
Join Date: May 2004
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanx for the suggestions but it didn't work in either version.

 
Old June 27th, 2004, 12:39 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

did u try?
Code:
RadioButtonList1.SelectedValue = "urValue"
Always:),
Hovik Melkomian.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Assigning variable value from a radio button cybersnac VB How-To 0 February 14th, 2007 03:57 PM
Assigning Command Button to Query young20 Access VBA 1 November 6th, 2006 12:15 PM
Radio Button List zacksofia ASP.NET 2.0 Basics 3 March 27th, 2006 11:00 AM
check if radio button list selection made jtyson Classic ASP Basics 1 July 3rd, 2004 12:34 AM
Button acts depending on radio button values janise Access 4 March 10th, 2004 12:53 AM





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