I Have a model, which is a List of some objects. Every object, has a "description" filed. Now, I want a dropdown list with all the descriptions, that inside this list.
public ActionResult PopPage(string line)
{
List<Campaign> CampaignList = new List<Campaign>();
SetLogFiles();
try
{
ViewBag.CLID = line;
CampaignList = DBAccess.GetCampaigns();
}
catch (Exception ex)
{
Logger.WriteError(ex);
}
return View("LineStatePopUp",CampaignList);
}
In the top of the view:
@model List<ClickServer.Models.Campaign>