string url = Url.Action("Index", "Home");
var routeValues = new { id = 1 }; string url = Url.Action("Details", "Products", routeValues);
string url = Url.Action("Contact", "Home", null, "https", "www.example.com", null);In this example, we are creating an absolute URL for the "Contact" action in the "Home" controller using the "https" scheme and the "www.example.com" host name. The Url ActionUri class is part of the ASP.NET MVC framework, which is built into the .NET Framework.