问题
Does anybody know what's the difference between Html.RenderAction and Html.Action?
回答1:
Html.Action()
– Outputs string
Html.RenderAction()
– Renders directly to response stream
If the action returns a large amount of HTML, then rendering directly to the response stream provides better performance than outputting a string.
回答2:
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
来源:https://stackoverflow.com/questions/2955261/difference-between-html-renderaction-and-html-action