In my program I have put,
<%: Html.EditorFor(m => m.EducationData
, "~/Views/HTML/Shared/EditorTemplates/Foo/CustomTemplate.ascx")%>
but it doesn't load the editor templates from the path I've given. I've seen in some of the examples,link where they have given custom paths for the templates. Can anyone suggest something? or does MVC2 supports custom paths for editor templates? or Is there a way to customize the web.config or some configurations,so I could change the default template locations???
I think you have too many folders. There is a specific convention you should follow when using EditorTemplates and DisplayTemplates. Try putting your templates in this folder and it should work:
"~/Views/Shared/EditorTemplates/CustomTemplate.ascx"
Update:
Not all of your editortemplates need to go into the Shared folder. You can put controller-specific templates into controller-specific folders too:
"~/Views/Home/EditorTemplates/CustomTemplate.ascx"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With