@Html.Action Vs @Html.RenderAction
The two compared...

Last updated on 14 Dec 2016 | Posted on 20 Nov 2016

What is the main difference between using @Html.Action and @Html.RenderAction? The answer is simple:

They both effectively perform the same thing in that they return an HTML string. However, Html.RenderAction returns a string but directly to the response - which is better for performance and suits loading larger amounts of HTML. Html.Action just returns the string along with the result.

To summarise:

They can be used like so:

@Html.Action("actionName", "controllerName")
@{ Html.RenderAction("actionName", "controllerName"); }

The action name would generally be the method you want to call inside the controller, the name of which you need to specify as the second parameter.

Creating Placeholders in MVC using @RenderSection

Creating Placeholders in MVC using @RenderSection

Posted on 03 Dec 2016

It is common in web development and beneficial in other ways such as aiding performance to only load what needs to be loaded on each page of your webs…

Read more