RenderAction RenderPartial

前端 未结 2 1662
臣服心动
臣服心动 2020-11-29 22:13

From what I have understood there is a big difference between the Html.RenderPartial included in the ASP.NET MVC release and the HTML.RenderAction

2条回答
  •  生来不讨喜
    2020-11-29 23:04

    Working with MVC requires much attention to not to shoot yourself in the foot. I mean it by the efficiency of the MVC products. In complex projects I would prefer to use RenderPartial rather than RenderAction. I use RenderPartial in which I use jQuery.ajax request (with Html.Action). It definitely works more efficiently than RenderAction. By this way you can put your Views into cache and then call jQuery.ajax. Try it yourselves. Ayende explains it clearly in Hibernating Rhinos.

提交回复
热议问题