mvc 5枚举到下拉列表 [英] mvc 5 enum to dropdownlist
本文介绍了mvc 5枚举到下拉列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有像这样的经销商类型的扩展类
i have extension class for dealer type like this
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace ABW.Application.Models
{
public partial class Dealer
{
public enum DealerTypes {
Independent=1,NewCar=2
}
public DealerTypes DealerType
{
get
{
return (DealerTypes)Type;
}
set
{
Type = (byte)value;
}
}
}
}
使用此我希望在视图中创建下拉列表
任何人都可以帮助我同样的
using this i want create dropdown list in view
can anyone help me for the same
推荐答案
这篇关于mvc 5枚举到下拉列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文