Difference Html.Partial and Html.RenderPartial
While one can store the output of Html.Partial in a variable or return it from a method, one cannot do this with Html.RenderPartial. The result will be written to the Response stream during execution/evaluation.
Difference is Html.Partial returns an
MvcHtmlString and Html.RenderPartial outputs straight to the response.
Html.RenderPartial: directly render/write on output stream and returns void and it’s very fast in comparison to Html.Partial
You can store the output of Html.Partial in a variable, or return it from a function. You cannot do this with Html.RenderPartial. The result will be written to the Response stream during the execution
Difference Html.Action and Html.RenderAction
The same is true for Html.Action and Html.RenderAction.
The return type of
void that means it directly render the responses in View where return type of
MvcHtmlString you can catch its render view in controller and modify it