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")