Question

In a .NET MVC3 Razor webapplication, how is it possible to use an EditorTemplate which is in another Area? (using the HtmlHelper´s EditorFor method)

Was it helpful?

Solution

Can you move the editor template out of the area? If you put it in the root /Views/Shared/EditorTemplates, you can then access it from any area.

OTHER TIPS

If I am interpreting "another Area" correctly: You can always directly reference objects by using explicit targeting.

MyApplication.Helpers.MyEditorTemplate myTemplate; 
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top