In a custom viewengine in the findview method the mastername is always empty, even if the page has a masterpage defined. Any idea why, or how can I get the mastername?
In the viewEngine class:
MasterLocationFormats = new[] {
"~/{0}.master",
"~/Shared/{0}.master",
"~/Views/{1}/{0}.master",
"~/Views/Shared/{0}.master"
};
public override ViewEngineResult FindView(ControllerContext controllerContext, string viewName, string masterName, bool useCache) { }
In the page:
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Empty.Master" Inherits="System.Web.Mvc.ViewPage" %>
The master file exists.
Thank you!