David Green

David Green

  • NA
  • 7
  • 0

Listbox control results

Jan 17 2009 3:18 PM
I have the following code 7 times to work with 7 listbox controls
Code:

 BreedLabel1.Text += "<b>Selected Breeds:</b>" + "<br/>";
        foreach (ListItem li in BreedList1.Items)
        {
            if (li.Selected)
                BreedLabel1.Text += String.Format("({0}) {1}", li.Value, li.Text) + "<br/>";
        }
In the results (which post below the selct button) I want to add a dropdownlist to each and every result.
The results are breeds and then I want the dropdown lists to be for classes. All that needs to be is a simple select classid and class from the database.

I then want to submit the user id (which I have in a label) the selected breedid's and also the dropdownlists class id into a database table.

The class is not connected to the breed. But each result from the select options must have a class assigned to it.

Any ideas how I can do it?

My result should show something like.

Group1
(id)Breed : Dropdownlist
(id)Breed : Dropdownlist

Group2
(id)Breed : Dropdownlist
(id)Breed : Dropdownlist

Submit

hope this makes sense

Dave