|
Subject:
|
Webform listbox control databing to any property
|
|
Posted By:
|
Rachel P
|
Post Date:
|
9/30/2005 9:49:36 AM
|
I know that you can bind to any property in a listbox's DataSource in a windows form using syntax of the format:
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.
|
|
Reply By:
|
mat41
|
Reply Date:
|
10/1/2005 9:43:21 PM
|
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
|
|
Reply By:
|
Rachel P
|
Reply Date:
|
10/1/2005 10:01:02 PM
|
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.
|