dag78
01-15-2009, 04:35 PM
I have the following code times to work with 7 listbox controls
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 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 fromthe database.
I then want to submit the user id (which I have in a label) the selected breedid's and then from the dropdownlists a class id into a database.
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?
Dave
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 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 fromthe database.
I then want to submit the user id (which I have in a label) the selected breedid's and then from the dropdownlists a class id into a database.
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?
Dave