I’m trying to create a dropdownlist that contains a list of items:
@Html.DropDownList("displayCount", new SelectList(
new[]
{
new SelectListItem { Value = "25", Text = "25" },
new SelectListItem { Value = "50", Text = "50" },
new SelectListItem { Value = "100", Text = "100" },
}
));
When I look at my dropdownlist, it just has 3 options that say “System.Web.Mvc.SelectListItem”
What do I need to do differently here?
Try: