1. The return value of the method with render is void, output inside the method, and the return value type is mvchtmlstring, so this can only be used:
@Html. Partial corresponds to @{html.renderpartial (...);}
@Html. Action corresponds to @{html.renderaction (...);}
2, html.partial can directly provide the user control name as a parameter, and html.action need to have a corresponding action, within the action return Partailresult (that is, Retun Partialview ()).
3, for a simple user control without any logic, it is recommended to use html.partial; for user controls that need to set some model, Html.action is recommended. Of course, there are model data can also use the Html.partial method, you can see the overloads of the method.
4, the use of html.action has the advantage that can be based on different scenarios to choose a different user control.
Like what:
@Html. Action ("Userinfocontrol")
In the corresponding Userinfocontrol this action, when the user is not logged in, you can Retun Partialview ("Logonusercontrol"), after logging in, you can Retun Partialview (" Userinfocontrol ");
About ASP. MVC3 [email protected], @Html. Action, @Html. renderpartial, @Html. renderaction