RenderBody vs RenderPage vs RenderSection
@RenderBody
In layout pages, renders the portion of a content page that is not within a named section.
사용법 : @RenderBody()
@RenderPage
Renders the content of one page within another page.(Overrides WebPageRenderingBase.RenderPage(String, Object[]).)
사용법 : @RenderPage("~/Views/Home/RenderPage.cshtml", null)
@RenderSection
In layout pages, renders the content of a named section.
사용법 : @RenderSection("scripts", required: false)
@section scripts
{
<script>
alert("RenderSection Test....");
</script>
}
Html.Partial
Html.RenderPartial
Html.Partial vs Html.RenderPartial
http://taeyo.net/Columns/View.aspx?SEQ=566&PSEQ=40&IDX=0
https://www.codeproject.com/Questions/1059778/What-is-Difference-between-Html-Partial-and-Html-R
Html.Action
Html.RenderAction
action, controller 호출 가능.
@{ Html.RenderAction("action name", "controller name"); }