when passing a collection to EditorFor(), it generates invalid names for input elements

前端 未结 6 1703
心在旅途
心在旅途 2021-02-06 02:06

I have a BookCreateModel which consists of book\'s plane info such as Title, PublishYear & etc plus a collection of book Authors (complex type) :

public clas         


        
6条回答
  •  终归单人心
    2021-02-06 02:34

    Don't know if it's still relevant, but this blog covers a solution to your problem: http://btburnett.com/2011/03/correcting-mvc-3-editorfor-template-field-names-when-using-collections.html

    --> Credits go to itsmatt for finding it :) Jakob

提交回复
热议问题