Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add CSS class to Html.ActionLink

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?

like image 374
Sachin Kainth Avatar asked May 10 '12 14:05

Sachin Kainth


1 Answers

Html.ActionLink("Link Name", 
                "ActionName",
                "ControllerName",
                null,
                new { @class = "myCssClass" }
                )
like image 101
Curtis Avatar answered Sep 26 '22 00:09

Curtis