In ASP.NET MVC the URLHelper provides a method called Action that generates a fully qualified URL to an action method by using the specified action name, controller name, route values, and protocol to use.
In ASP.NET MVC, Controllers and Views has a property called Url
that exposes a URLHelper
type, which help to create URL address.
The URLHelper
provides a method called Action
that generates a fully qualified URL to an action method by using the specified action name, controller name, route values, and protocol to use, for sample:
<a href="@Url.Action("Create", "Product", new { area = "Sales" })">New Product</a>
See de MSDN documentation.