티스토리 뷰

@RenderBody

In layout pages, renders the portion of a content page that is not within a named section.

사용법 : @RenderBody()


@RenderPage

https://docs.microsoft.com/en-us/dotnet/api/system.web.webpages.webpagebase.renderpage?view=aspnet-webpages-3.2

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

https://docs.microsoft.com/en-us/dotnet/api/system.web.mvc.html.partialextensions?view=aspnet-mvc-5.2


Html.RenderPartial

https://docs.microsoft.com/en-us/dotnet/api/system.web.mvc.html.renderpartialextensions?view=aspnet-mvc-5.2


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"); }

반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2024/04   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
글 보관함