I have a date label template in ~/Views/Shared/DisplayTemplates/Date.vbhtml
.
If in a controller I call Return PartialView("MyPartial", result)
the date controls in the partial view will be replaced by my custom date template. And everything works correctly. This is the case where the partial path is resolved by the engine.
But if in the controller I call Return PartialView("~/Views/MyController/MyPartial.vbhtml", result)
. Then the custom display templates are never called. However if I put the display templates in ~/Views/MyController/DisplayTemplates/Date.vbhtml
then it works again.
So my problem is I need the partial views that are specified with an absolute path to find the DisplayTemplates in the ~/Views/Shared/DisplayTemplates/
folder. It seems like for some reason when there is an absolute path is doesn't bother to check the shared folder?