@Html.ActionLink("Home", "Index", "Home")
@Html.ActionLink("Edit", "Edit", "User", new { id = user.Id }, new { @class = "btn btn-primary" })In this example, the link text is "Edit", the controller is "User", and the action is "Edit". The route value "id" is set to the "Id" property of the "user" object. The HTML attributes for the link element are a CSS class "btn" and "btn-primary". Package library: System.Web.Mvc Note: The code examples are written in Razor views.