ASP.NET MVC 2.0 - Difference between RenderPartial and RenderAction

前端 未结 3 408
旧时难觅i
旧时难觅i 2021-01-11 13:06

I am trying to understand the difference between a RenderPartial and RenderAction. I guess that RenderPartial is like a UserControl and RenderAction is like a server-side i

3条回答
  •  孤街浪徒
    2021-01-11 13:28

    RenderPartial specifies a partial view and passes a model to it.

    RenderAction specifies a controller and an action, any model data will be gathered by the controller.

    This is quite a good explanation

提交回复
热议问题