Understanding MVC Tags for nopCommerce

I am new to MVC, and in the application I downloaded and trying to debug, I see this mark

@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 the .cshtml file.

+7
asp.net-mvc nopcommerce
source share
1 answer

I would advise you to take a look at the link, for example http://www.asp.net/mvc , in order to better understand ASP.Net MVC. Having said that @ HTML.Widget etc. - This is server-side code that is called during the HTML generation process.

I heard about nopCommerce, but I am not familiar with the structure, but @Html is usually used for server side helper methods.

@ Html.Partial ("_ Notifications") is used to add a partial view of _Notifications to the displayed page.

The @ Html.Action method will display the html A tag with the href link to the controller and the action to be performed.

@ Html.Widget I am not familiar, but it can be assumed that this is a helper method.

@RenderBody is used on the main page (usually shared / _Layout.cshtml) as a server-side marker to display the view that comes from the corresponding controller.

+4
source share

All Articles