Sanjay Sabariya
What is the main difference between @Html.Partial and @Html.RenderPartial in MVC Asp.net?
By Sanjay Sabariya in ASP.NET on May 22 2015
  • Vignesh Mani
    Jun, 2015 19

    @Html.Partial is a return type and can store return value to a [email protected] is a no return type. it is a void. It directly execute where we call inside normal view.

    • 2
  • Sanjay Sabariya
    May, 2015 22

    @Html.Partial as HTML code copied into the parent page and @Html.RenderPartial as an .ascx user control incorporated into the parent page. '@Html.Partial' returns a html encoded string that gets constructed inline with the parent. It accesses the parent's model.'@Html.RenderPartial' returns the equivalent of a .ascx user control. It gets its own copy of the page's ViewDataDictionary and changes made to the RenderPartial's ViewData do not effect the parent's ViewData.

    • 1
  • Sreekanth Reddy
    Jun, 2015 16

    @Html.Partial("partialviewname")--> returns MVC HTML [email protected]("partialviewname")-->return type will be void(changes will not effect).

    • 0
  • Khan Abrar Ahmed
    Jun, 2015 16

    http://stackoverflow.com/questions/5248183/html-partial-vs-html-renderpartial-html-action-vs-html-renderaction

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS