Official “How to” for MVC Editor/Display Templates?

前端 未结 3 1789
鱼传尺愫
鱼传尺愫 2020-12-19 01:07

I have been using MVC Editor & Display Templates for a while, but have come to realize that there seems to be very little official documentation on MVC Editor/Display Te

3条回答
  •  时光取名叫无心
    2020-12-19 01:21

    Official documentation? Don't know any off hand, but I know there are a ton of examples. In particular, I like Phil Haack's discussion on model binding to lists. It includes an example for an editor template in a pretty complicated example. There's source code there, too.

    Since he's co-authored every MVC Wrox book, I consider him a pretty definitive source:

    http://haacked.com/archive/2008/10/23/model-binding-to-a-list.aspx

    Here's another blog post (non-official) in a similar vein:

    http://blogs.msdn.com/b/stuartleeks/archive/2010/03/30/collections-and-asp-net-mvc-templated-helpers-displayfor-editorfor.aspx

提交回复
热议问题