标签: asp.net-mvc class razor model data-annotations
可以根据模型注释更改视图输入类。例如:
[required] [class("phone-class")] public string Phone {get; set;}
并输出
<input name="Phone" class="phone-class" />