Pergunta

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)

Foi útil?

Solução

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.

Outras dicas

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

MyApplication.Helpers.MyEditorTemplate myTemplate; 
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top