在cshtml中更改Link的颜色

Pus*_*tal 2 razor asp.net-mvc-3

我想在我的cshtml页面中更改链接的clolor.

@Html.ActionLink("WareHouse", "WareHouseIndex", "Admin")
Run Code Online (Sandbox Code Playgroud)

我想把这个上面的颜色链接到白色.请建议我该怎么做?

wil*_*lvv 7

只需将htmlattributes参数添加到调用中,设置样式:

@Html.ActionLink("WareHouse", "WareHouseIndex", "Admin", null, new {style = "color:white"})
Run Code Online (Sandbox Code Playgroud)