Understanding MVC tags for nopCommerce
I am new to MVC , and in the application i downloaded and trying to debug i see this mark up
@Html.Widget("body_start_html_tag_after")
@Html.Partial("_Notifications")
@Html.Action("AdminHeaderLinks", "Common")
What does this mean?, @Html.Partial where can I find where the value "body_start_html_tag_after") is defined ?
And this one:
<div class="master-wrapper-main">
@RenderBody()
</div>
Where can i find what @RenderBody
does?, this is in a .cshtml
file.
I would suggest that you look at a reference like http://www.asp.net/mvc to gain a greater understanding of ASP.Net MVC. Having said that the @HTML.Widget, etc is server side code that gets called during the HTML generation process.
I have heard of nopCommerce but I am unfamiliar with the structure, but @Html is usually used for server side helper methods.
@Html.Partial("_Notifications") is used to add the _Notifications Partial view to the page being rendered.
@Html.Action method will render a html A tag with the href link to the controller and action to be performed.
@Html.Widget I am unfamiliar with but one could assume that it is a helper method.
@RenderBody is used on a master page (usually the shared/_Layout.cshtml) as a server side marker to render the view that comes from the associated controller.
链接地址: http://www.djcxy.com/p/74120.html上一篇: 甚至在m2e安装之后,Maven也没有在Eclipse(Kepler)中出现
下一篇: 了解nopCommerce的MVC标签