getting ListBox to behave like DropDownList
Hi All
I'm using VS Pro 2010 and have worked through Chapter 13 in the book. My experience is mostly in PHP.
My question is this: how do I get the ListBox control in my DetailsView to behave like the DropDownList did in the Chapter 13 exercises.
I actually do have it working, but I want its SelectionMode to be "Multiple". When I use it now only the first selection is inserted into the database.
Ultimately (after I learn a lot more) I'd like to do everything properly and have those multiple selections insert into a different table (one-to-many) but for now I would be happy settling for a comma-separated string (ie: "blue,red,white").
I thought I was on the right track writing some code in the DetailsView1_ItemInserting subroutine, but I can't seem to be able to access my ListBox control in order to loop through it.
If anyone can point me in the right direction that would be awesome!
|