MVC 中DropDownList  用法

后台

1 Dictionary<string, int> dc = new Dictionary<string, int>();
2 dc.Add("订单提交", 0);
3 dc.Add("订单确认", 1);
4 dc.Add("已入库", 2);
5 dc.Add("代付款", 3);
6 dc.Add("已支付", 4);
7 dc.Add("出库", 5);
8 SelectList items = new SelectList(dc, "Value", "Key");
9 ViewBag.GenderList = items;
View Code

相关文章: