Setting DataTextField and DataValuedField on the fly?

G

Guest

Greetings all -

I'm trying to determine if .NET will allow me to do this and I'm at wits end on it. I have a listbox (Call it ListBoxB) that accepts values from another listbox (Call it ListboxA), which is bound to my database. I can set up the DataTextField and DataValueField fine in my ListBoxA which is bound but wondered how I can accomplish this in an unbound scenario because ListBoxB will ultimately needed to be submitted with the form to the database and I need the field mappings to refer to

Any ideas how I can accomplish this in code so if I come to a place where I want to add data to the listbox, do I need to address this property before I call my .add??

Cheers
Mike
 

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,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top