我想在我的视图中使用下面的属性和下拉框。我怎么能 ?我已经尝试了很多方法,但
请帮助
public IEnumerable<SelectListItem> Topic
{
get
{
return new[]
{
new SelectListItem { Value = "1", Text = "Science", Selected=true },
new SelectListItem { Value = "2", Text = "History" },
new SelectListItem { Value = "3", Text = "Physics" },
};
}
}