Difference between Html.RenderAction and Html.Acti

2019-01-06 19:19发布

Does anybody know what's the difference between Html.RenderAction and Html.Action?

2条回答
劫难
2楼-- · 2019-01-06 19:52

The difference between the two is that Html.RenderAction will render the result directly to the Response (which is more efficient if the action returns a large amount of HTML) whereas Html.Action returns a string with the result.

check out this link for a detailed explanation

查看更多
放我归山
3楼-- · 2019-01-06 20:06

Html.Action() – Outputs string

Html.RenderAction() – Renders directly to response

Response stream is the better performance from string output.

查看更多
登录 后发表回答