URL
Application-relative URL Url.Content("~/Content/Site.css")
Output:
/Content/Site.css
Link to named action/controller Html.ActionLink("My Link", "Index", "Home")
Output:
<a href="/">My Link</a>
My Link
URL for action Url.Action("GetPeople", "People")
Output:
/People/GetPeople
URL using route data Url.RouteUrl(new {controller = "People", action="GetPeople"})
Output:
/People/GetPeople
Link using route data Html.RouteLink("My Link", new {controller = "People",action="GetPeople"})
Output:
<a href="/People/GetPeople">My Link</a&g
My Link
Link to named route Html.RouteLink("My Link", "FormRoute", new {controller = "People",
action="GetPeople"})
Output:
<a href="/app/forms/People/GetPeople">My Link</a>
My Link