Using ASP.NET MVC v2 EditorFor and DisplayFor with IEnumerable Generic types

后端 未结 6 801
情话喂你
情话喂你 2020-12-07 22:51

I have a IList as a property named Tags in my model. How do I name the files for display and editor templates to respect it when I call

6条回答
  •  盖世英雄少女心
    2020-12-07 23:37

    I had the same problem as you :-/ but found this useful post which gives you 4 different options to solve the problem :-):

    http://blogs.msdn.com/b/stuartleeks/archive/2010/04/01/collections-and-asp-net-mvc-templated-helpers-part-4.aspx

    This is also interesting (more or less same solution as one of the solutions in the previous link - but interesting):

    http://weblogs.asp.net/rashid/archive/2010/02/09/asp-net-mvc-complex-object-modelmetadata-issue.aspx

提交回复
热议问题