0

I have three links inside master page up on clicking those three links user will be navigated to respective views.

The point is I need to high light the link from which he came to the view.

<ul class="yearPicker" style="list-style: none;">
        <li class="first">
          <%=
    this.Html.ActionLink("Day Planner", "Index", "Travel", null, new { style = "text-decoration:none;" })%></li>
        <li>
          <%=
    this.Html.ActionLink(
      "Executive Briefing", "Index", "ExecutiveBriefing", new { Id = 0 }, new { style = "text-decoration:none;" })%></li>
        <li class="last">
          <%=this.Html.ActionLink("News", "Index", "LFF", null, new { style = "text-decoration:none;" })%></li>
      </ul>
tereško
  • 58,060
  • 25
  • 98
  • 150
Pavan Josyula
  • 1,355
  • 3
  • 13
  • 25

1 Answers1

0

You could write a custom helper to generate those links as shown here. The helper will check the current controller and action and apply a CSS style to the link if they match.

Community
  • 1
  • 1
Darin Dimitrov
  • 1,023,142
  • 271
  • 3,287
  • 2,928