Wednesday, June 24, 2015
@RenderBody is a must in _Layout.cshtml otherwise error is thrown : The "RenderBody" method has not been called for layout page "~/Views/Shared/_Layout.cshtml".
Yes, RenderBody should be included on every layout page, regardless the nesting.
works as a placeholder for the engine to know where to drop the content of the view using the layout page.
ASP.NET Interview Questions
Share to Twitter
Share to Facebook
Share to Pinterest