Site icon Dotnet Helpers

MVC Razor : Difference between @Html.Partial() and Html.RenderPartial()

Difference between @Html.Partial() and Html.RenderPartial()

Example :

If want to refere partial view inside the shared, then it will

@{ Html.RenderPartial(“_testPartial”);}

If want to refere partial view inside the view, then it will be

@Html.Partial(“../Home/testContentPartial”)

 

Exit mobile version