Add CSS class to Html.ActionLink

asp.net-mvc-3, asp.net-mvc-views, css

Solution

Html.ActionLink("Link Name", 
                "ActionName",
                "ControllerName",
                null,
                new { @class = "myCssClass" }
                )

Problem

I want to style a link in my page and am using Html.ActionLink to create the link. The problem is I don't know how to style the resulting link. How do I add a CSS class to the Html.ActionLink in order to style it?

Original source