Databinding

W

Wayne

I am trying to bind a List<T> to a dropdownlist and have the dropdownlist
display a property of the class that the list contains.

I have the following

public class Test
{
private int number;

public string Number
{
get { return number; }
set { number = Value; }
}
}


Then I do:

List<Test> list = new List<Test>;
Test curTest;
while ()
{
curTest = new Test();
curTest.Number = someNumber;
list.Add(Test);
}


From here I am unsure how to do the databinding of list so that it pulls the
Number off of each Test instance.


--
Thanks
Wayne Sepega
Jacksonville, Fl

Enterprise Library Configuration Console Module Generator
http://workspaces.gotdotnet.com/elccmg

"When a man sits with a pretty girl for an hour, it seems like a minute. But
let him sit on a hot stove for a minute and it's longer than any hour.
That's relativity." - Albert Einstein
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top