1

I want to style only part of text inside my ActionLink, I need the plus sign to be bold. In pure html I can do it this way.

<a class="topMenu" href="#"><span style="font-weight:bold;">+</span>Invite User</a>

If try it with ActionLink like this:

@Html.ActionLink("<span style="font-weight:bold;">+</span>Invite User", "Invite", "Account", new { @class = "topMenu" })

It gets rendered as it is, just as a line of text.

Is it possible to get it styled like in pure HTML?

Alex Tertyshnyk
  • 71
  • 3
  • 10
  • possible duplicate of [Raw ActionLink linkText](http://stackoverflow.com/questions/6063467/raw-actionlink-linktext) – Pete Jan 27 '15 at 09:36

1 Answers1

2

I would use Url.Action

<a class="topMenu" href="@Url.Action("Invite", "Account")">
    <span style="font-weight:bold;">+</span>Invite User
</a>
Rajdeep Dosanjh
  • 1,157
  • 1
  • 9
  • 20