How to provide an EditorTemplate for IEnumerable<MyModel>?

拥有回忆 提交于 2019-12-12 01:49:41

问题


Is it possible to provide an Editor Template for IEnumerable (Or IList, List, MyModel[], for that matter)?


回答1:


I know this is a old post but what you can do is make a template called MyModelList that takes IEnumerable<MyModel> and then you can have a Html.EditorFor(x => x.MyModelList, "MyModelList")



来源:https://stackoverflow.com/questions/6460460/how-to-provide-an-editortemplate-for-ienumerablemymodel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!