Pushpendra Kuntal
Pushpendra Kuntal

Reputation: 6186

change the color of Link in cshtml

I want to change clolor of link in my cshtml page.

@Html.ActionLink("WareHouse", "WareHouseIndex", "Admin")

I want to make color of this above link to white. Please suggest what should i do for that ?

Upvotes: 3

Views: 12457

Answers (2)

willvv
willvv

Reputation: 8639

Just add the htmlattributes argument to the call, setting the style:

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

Upvotes: 8

David Wick
David Wick

Reputation: 7095

use: @Html.ActionLink("WareHouse", "WareHouseIndex", "Admin", null, new { style = "color: #fff" })

or better yet new { @class = "white-link" } and style with css.

Upvotes: 2

Related Questions