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 September 30th, 2005, 09:49 AM
Registered User
 
Join Date: Jun 2005
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default Webform listbox control databing to any property

I know that you can bind to any property in a listbox's DataSource in a windows form using syntax of the format:

Code:
ListBox1.DataBindings.Add(New Binding("BackColor", MyDataSet, "Customers.Background"))
where ListBox1 is a listbox, BackColor is the custom property you want to set by binding, and Customers.Background identifies the column in the dataset MyDataSet that you want to use to dictate the BackColor property.

I've heard that you can also do the above on a webform, though a listbox as it appears on a webform doesn't have a DataBindings property. Could any of you tell me if I'm mistaken about being able to bind any property of a Web Control to a column from a dataset, and if not what the syntax for achieving that should be, please?

Thanks,
Rach.
 
Old October 1st, 2005, 09:43 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

Rach

This is the classic ASP area of the forum. You will get better solutions quicker in the .net area

Wind is your friend
Matt
 
Old October 1st, 2005, 10:01 PM
Registered User
 
Join Date: Jun 2005
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by mat41
 Rach

This is the classic ASP area of the forum. You will get better solutions quicker in the .net area

Wind is your friend
Matt
Oops! - thanks Matt, I'll do that. :)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows Form Control In WebForm windows_mss ASP.NET 1.0 and 1.1 Professional 0 January 25th, 2007 02:16 AM
Set Listbox Selected property DaDeViL VB How-To 7 October 4th, 2006 04:04 PM
Webform listbox databinding to any property Rachel P VS.NET 2002/2003 0 October 1st, 2005 10:11 PM
can't change label's property on webForm! goldablasha C# 2 February 14th, 2005 12:26 AM
Fire WebForm Method from User Control bamirzada C# 0 August 21st, 2003 03:16 PM





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