Html.Partial() | Html.RenderPartial() |
---|---|
Html.Partial returns html string. | Html.RenderPartial returns void. |
Html.Partial injects the html string of the partial view into the main view. | Html.RenderPartial writes html in the response stream. |
Performance is slow. | Perform is faster compared with HtmlPartial(). |
Html.Partial() need not to be inside the braces. | Html.RenderPartial must be inside braces @{ }. |
Visit Partial View for more information.
Related Articles
- Difference between Html.RenderBody() and Html.RenderSection() in ASP.NET MVC
- How to pre-compile razor view in ASP.NET MVC?
- How to enable bundling and minification in ASP.NET MVC?
- How to enable client side validation in ASP.NET MVC?
- How to display an error message using ValidationSummary in ASP.NET MVC?
- How to bind a model to a partial view in ASP.NET MVC?
- View in ASP.NET MVC