In section 3.5.3 "Selecting Templates"
There is a section that reads:
If a template isn’t found in these folders, or if the view isn’t in an
area, the default view search locations are used:
<ControllerName>/EditorTemplates/<TemplateName>.ascx (or .aspx)
Shared/EditorTemplates/<TemplateName>.ascx (or .aspx)
I think this might be more clear if it specified that this was in the
Views sub-folder, i.e.
If a template isn’t found in these folders, or if the view isn’t in an
area, the default view search locations are used:
Views/<ControllerName>/EditorTemplates/<TemplateName>.ascx
(or .aspx)
Views/Shared/EditorTemplates/<TemplateName>.ascx (or .aspx)
It took me a bit to discover why my template wasn't working.
--
--------------------
Please feel free to comment on the progress of the book, the content, and the code samples. All code and text is available on the book's GitHub site at
http://github.com/jeffreypalermo/mvc2inaction. We hope developing this book out in the open and with your feedback makes it a great book for the community.