Home/MVC/Difference between Html.RenderPartial vs Html.Partial vs Html.RenderAction vs Html.Action in MVC

Difference between Html.RenderPartial vs Html.Partial vs Html.RenderAction vs Html.Action in MVC

In this post, we are going to discuss about Html.RenderPartial vs Html.Partial, Html.RenderAction vs Html.Action. Let we split this stuff in two ways  based on binding the static and dynamic content like Render partial and Action Partial .

Partial Vs RenderPartial

  • @Html.Partial(“Details”)  –  returns a String as an output
  • @{ Html.RenderPartial(“Details”); } –  returns void as an output

Action Vs RenderAction

  • @Html.Action(“ActionName”, “ControllerName”) – returns a String as an output
  • @{ Html.RenderAction(“ActionName”, “ControllerName”); } –  returns void as an output

Render vs Action partial

Let us discuss about the main difference between RenderAction and RenderPartial. RenderPartial will render the view on the same controller. But RenderAction will execute the action method , then builds a model and returns a view result.

Render Partial : Use Html.Partial when you are rendering static content.

Action Partial : Use Html.Action when handling dynamic Content/data.

Where to use Html.Partial and Html.Action

Html.PartialIf we need to display a static menu for all users from the partial view, then we can use Render partial.


View : Here we call the partial view from the view (passing model as input).

@Html.Partial(“_partialName”, model)

Html.Action: If we need to display different menu items based on the user level, then we can use Action Partial.



public ActionResult CustomerDetail() {
return PartialView(new CustomerDetailModel());


@model Model

Difference :

1) @Html.RenderPartial and @Html.RenderAction is the best practice to use in most cases because the output has been written in the same TextWriter object.

2) In contrast to this, @Html.Partial and @Html.Action methods create their own TextWriter instances at every time and buffer all their content into memory.

3) @Html.Action and @Html.RenderAction method is the best choice when you want to cache a partial view.
@Html.Partial and Html.RenderPartial method is the best choice when you want to load new view.

4) The return type for @Html.Partial and Html.Action returns string type values
@Html.RenderAction and Html.RenderPartial returns is void

5) @Html.Partial and @Html.Action will useful when assign the content into a variable for other purpose…


Have a cool coding………



  1. Nishant October 15, 2013 at 3:54 am


  2. Biranchi December 23, 2016 at 3:41 pm

    The return type for @Html.Partial is string and Html.Action is MvcHtml String

  3. Ashish February 7, 2018 at 4:01 am

    The return type for @Html.Partial and Html.Action is void
    @Html.RenderAction and Html.RenderPartial returns string type values

    This is wrong statement. Please modify it because return type for @Html.Partial and Html.Action is string and @Html.RenderAction and Html.RenderPartial returns void

  4. Thiyagu February 8, 2018 at 3:44 am

    Thanks for findings Ashish. its updated.

Leave a Reply