.NET MVC Custom Layout Layout

In user view in FindView method, how can I use Layout ? masterName always empty.

 ViewEngineResult FindView(ControllerContext controllerContext, string viewName, string masterName, bool useCache) { // How do I get WebViewPage.Layout to know what layout is used? } 
+8
c # layout asp.net-mvc
source share
1 answer

If you do not set your master at the controller level using return View(string viewName, string masterName) , masterName will always be empty. A wizard is usually defined during compilation of the view itself.

+3
source share

All Articles