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

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 class BookCreateModel
    {
        public string Title { get; set; }
        public int Year { get; set; }
        public IList<AuthorEntryModel> Authors { get; set; }
    }
    
    public class AuthorEntryModel
    {
        public string FirstName { get; set; }
        public string LastName { get; set; }
    }


in CreateBook view I have used `EditorFor` helper :

    @Html.EditorFor(m => m.Authors, "AuthorSelector")

and AuthorSelector template is as below:

    @for (int i = 0; i < Model.Count; i++)
    {
        @Html.TextBoxFor(o => o[i].FirstName)
        @Html.TextBoxFor(o => o[i].LastName)
    }

now the problem is EditorFor act a little weird and generate input names like this :

    <input id="Authors__0__FirstName" name="Authors.[0].FirstName" type="text" value="" />
    <input id="Authors__0__LastName" name="Authors.[0].LastName" type="text" value="" />

as you can see instead of generating names like `Authors[0].FirstName` it adds an extra dot  which makes the default model binder unable to parse posted data.


any idea ?

Thanks !
