Friday 30 September 2016

Difference between @html.Partial and @html.RenderPartial in mvc?



@Html.Partial :-  It’s return MvcHtmlString.
We can use Partial when you want to store little bit of text that need to be stored in variable.
It is slower than @Html.renderPartial.

@Html.RenderPartial :- It’s return void. 
It is use like custom control in asp.net where lots of html that not need to be stored in variable. 
It is faster than @Html.Partial.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.