0

I was following a post on here to add a glyph to a glyph to an ActionLink however I get "/Dashboard%20class=" this as my URL when all I want is to be redirected to the action that I specified without the %20class which is giving me errors

Here is the post I have been following Insert Glyphicons bootstrap in @Html.ActionLink mvc asp.net

my HTML goes as follows:

<li><a href="@Url.Action("Index", "Dashboard") class="btn btn-warning">
                        Dashboard
                        <span class="glyphicon glyphicon-home" />
                        </a>
                </li>
Community
  • 1
  • 1
Johnathon64
  • 1,280
  • 1
  • 20
  • 45

2 Answers2

5

You're missing a " after the URL.

Therefore, the next word (class) is part of the URL, until the following ".

SLaks
  • 868,454
  • 176
  • 1,908
  • 1,964
1

I looks like you are missing a closing quote after your closing parenthesis for your Url.Action. Otherwise it looks good.