[Table] Difference between Html.RenderPartial and Html.Partial in MVC Razor

There are different ways to render a partial view in MVC Razor such as using the Html.RenderPartial, Html.Partial, Html.Renderaction and Html.action etc. In the following table you can see the difference between Html.RenderPartial and Html.Partial.

Html.RenderPartial Html.Partial
Renderpartial writes the partial view response directly into http response stream. The return of partial method is html encoded string.
The return type of Html.RenderPartial is void. The result of this method can we stored in a variable because it return string type values
No action method required to call partial view by renderpartial. No need to create action method.
Renderpartail view method display the data is already in corresponding view. Partial view method display the data is already in corresponding view.
Response of this method faster because it write response directly in to response stream Its response slower than render partial
@{Html.RenderPartial(“_partialviewname”);} @Html.Partial(“_partialviewname “)

Author: Pavan

I am asp.net developer have good knowledge of Asp.net ver 05,08,10 and good hand in sql server.Proficient in Object Oriented Programming and javascript, jQuery. Achievements - Integrate Spotfire, appnexus API ASP.net with sql server. Hobbies - Blogging ,Games, Movies ,Teaching,Keeping myself update with new technologies