@Url.Action()
It generates a URL as per provided action name, contrillername, route object.
It contains 8 overload methods.
@Url.Action("ActionMethod","Controller")
@Html.Action()
It calls child action in a controller and return Html string as result.
It contains 6 overload methods.
@Html.Action("ActionMethod","Controller")
Controller action:
public class MyController
{
[ChildActionOnly]
public ActionResult ActionMethod()
{
var menu = GetMenuFromSomewhere();
return PartialView(menu);
}
}
Use @Url.Action() when you are redirecting any page, you can use that in
<a href="@Url.Action("Action")">click</a>
In other hand you need to use @Html.Action() when you need result as HTML string. You can bind partial in your view page.