将类添加到@Html.ActionLink

Ron*_*ald 3 c# asp.net asp.net-mvc-4

如何向这个@Html.ActionLink 添加一个类?我已经尝试了很多建议,但到目前为止都没有奏效。

                        @Html.ActionLink("Physician Profile",
                                     "Print",
                                     "Roster",
                                     new { profilePrintType = ProfilePrintType.PhysicianProfile},
                                     new { style="padding:2px 10px;" })
Run Code Online (Sandbox Code Playgroud)

Mat*_*ily 5

对于保留字,您必须添加@

new { @style="padding:2px 10px;", @class = "className" })
Run Code Online (Sandbox Code Playgroud)