Arnis Lapsa
Arnis Lapsa

Reputation: 47587

Difference between Action() and RenderAction()?

In asp.net mvc2, what's the difference between

Html.Action(...)

and

Html.RenderAction(...)

?

Upvotes: 10

Views: 7157

Answers (1)

Ryan Rivest
Ryan Rivest

Reputation: 1029

Phil Haack does a great job explaining the two methods in this post.

"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."

Upvotes: 18

Related Questions