PartialViewResult in ASP.NET MVC controller
return PartialView()… yeah as it suggests it will return partial view but I think many developer does not know about PartialViewResult or have never used it. So let’s have quick discussion on it.
Let start with scratch, as we know @Html.Partial is used to inject partial view markup inside another view and while using @Html.Partial, it will not render layout view simply it will render content of partial view without applying layout view. It is very much necessary because the partial view content will be rendered within another view (or sometime partial view) and hence that view has already applied layout view so there is no need to apply layout view again on partial view. One more important aspect is that generally partial view markup will be reflected as a part of page but not directly as a page (read again!) and layout view contain markup for whole page layout and not for specific part of page. So again no need to apply layout view while rendering partial view.