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)

Était-ce utile?

La 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.

Autres conseils

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

MyApplication.Helpers.MyEditorTemplate myTemplate; 
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top