
@HTML.DropDownList("UnitConversionID",(IEnumerable<SelectListItem>)VIEwBag.UnitConversionID,"No Unit Seleced",new { ng-model="newItem.UnitConversionID" }) 我也尝试过这个.但我收到一个错误:
@HTML.DropDownList("UnitConversionID",new { @ng-model="newItem.UnitConversionID" }) 有没有办法在DropDownList中添加“ng-model”?
解决方法 您可以通过在定义中将短划线更改为下划线来获取包含短划线(以及所有类型的HTML5数据属性)的任何类型的属性:@HTML.DropDownList("UnitConversionID",new { ng_model="newItem.UnitConversionID" }) 总结 以上是内存溢出为你收集整理的c# – 如何在DropDownList中添加“ng-model”?全部内容,希望文章能够帮你解决c# – 如何在DropDownList中添加“ng-model”?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)