What's the difference between “return View()” and “return PartialView()”

前端 未结 3 1761
孤独总比滥情好
孤独总比滥情好 2020-12-24 11:19

I understand that partial views are used to render parts of a view. But I can\'t understand what\'s the difference between return View() and return Partia

3条回答
  •  青春惊慌失措
    2020-12-24 11:50

    A controller action typically returns a PartialView when AJAX is used, and an update of the page region represented by the partial view is performed. The normal way to use partial views is simply to call Html.RenderPartial inside your main view.

提交回复
热议问题