The Url.Action method in ASP.NET MVC allows the developers to generate the fully qualified URL to an action method. It is defined in the namespace System.Web.Mvc.
The Url.Action generates only the URL unlike the Html.ActionLink.
Url.Action in ASP.NET MVC
Below is a code snippet of the View demonstrating the Url.Action
@model MvcApplication1.Models.EmployeeVM <h2>Abundant Code</h2> URL is @Url.Action("Index", "AbundantcodeHome", new { id = "Article No.1" })
Leave a Reply