如何在此@ Html.ActionLink中添加一个类?我已经尝试了许多建议,到目前为止还没有任何建议。
@Html.ActionLink("Physician Profile",
"Print",
"Roster",
new { profilePrintType = ProfilePrintType.PhysicianProfile},
new { style="padding:2px 10px;" })
答案 0 :(得分:4)
对于保留字,您必须添加@
new { @style="padding:2px 10px;", @class = "className" })
答案 1 :(得分:2)
@Html.ActionLink("Physician Profile",
"Print",
"Roster",
new { profilePrintType = ProfilePrintType.PhysicianProfile},
new { style="padding:2px 10px;", @class = "some-css-class" })