I've got an editor template location in:
Areas/Posts/Views/Shared/EditorTemplates/Question.cshtml
I also have one in:
/Views/Shared/EditorTemplates/Question.cshtml
For both, the model is the same.
What i'm trying to do is within a View in the Posts
area, call my editor template in the area, set some HTML and then bubble back up to the main shared editor template.
Here's the Posts
EditorTemplate:
@model xxx.ViewModels.QuestionViewModel
@Html.Hidden("Id", (byte)Model.QuestionType)
@Html.EditorForModel()
But all it does it render out the hidden field, not the contents of the shared editor template.
If i get rid of the Posts
editor template, the shared one is rendered properly.
I'm guessing MVC/Razor thinks this is recursive or something? Like im calling the same template?
Is there any way i can tell it to go to the shared one?
Essentially, i'm trying to re-use the HTML in the shared template, but inject some sneaky HTML of my own.