top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Please Explain about RenderBody and RenderPage in ASP.Net MVC?

+1 vote
452 views
Please Explain about RenderBody and RenderPage in ASP.Net MVC?
posted Mar 14, 2017 by Jdk

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

RenderBody:

RenderBody method exists in the Layout page to render child page/view. It is just like the ContentPlaceHolder in master page. A layout page can have only one RenderBody method.

@RenderBody()

RenderPage:

RenderPage method also exists in the Layout page to render other page exists in your application. A layout page can have multiple RenderPage method.

@RenderPage("~/Views/Shared/_Header.cshtml")
answer Mar 31, 2017 by Shivaranjini
...