Now you can Subscribe using RSS

Submit your Email
Showing posts with label Difference between Html.Partial() and Html.RenderPartial(). Show all posts
Showing posts with label Difference between Html.Partial() and Html.RenderPartial(). Show all posts

8 Things You Don't Want to Hear About Difference between Html.Partial() and Html.RenderPartial() in ASP.NET MVC

A LIFE ABK











c/c++ program solver,c++ program, new program, program code ,programing question




 

Html.Partial()

  • Html.Partial returns html string.
  • Html.Partial injects the html string of the partial view into the main view.
  • Performance is slow.
  • Html.Partial() need not to be inside the braces.
  • Html.RenderPartial()

  • Html.RenderPartial returns void.
  • Html.RenderPartial writes html in the response stream.
  • Perform is faster compared with HtmlPartial().
  • Html.RenderPartial must be inside braces @{ }.
  • Coprights @ 2021-2022, Ancient Code Designed By AbK