Show manufacturers in dropdownlist

12 years ago
I want to show manufacturers in dropdownlist, instead of how it is layed out now. How can I do it?
12 years ago
Hello

Add DropDownList to ManufacturerNavigation.ascx user control. And modify ManufacturerNavigation.ascx.cs:

ManufacturerCollection manufacturers = ManufacturerManager.GetAllManufacturers();
this.ddlManufacturer.Items.Clear();
foreach (ManufacturerTemplate manufacturer in manufacturers)
{
      ListItem item2 = new ListItem(manufacturer.Name, manufacturer.ManufacturerID.ToString());
      this.ddlManufacturer.Items.Add(item2);
}