MVC基于下拉列表创建属性

时间:2015-12-08 10:16:30

标签: html model-view-controller

我想创建一个静态下拉列表

@Html.dropdownlist("Category", new List<SelectListItem>
{
new SelectListItem{value = "1", Text = "All"},
new SelectListItem{value = "2", Text = "Amy" }
})

我想将此类别映射到我的对象类,以便在查询页面运行查询时能够访问该属性并执行切换大小写,以便根据所选的不同下拉列表项执行不同的操作。

请帮忙。

提前致谢。

0 个答案:

没有答案