Assuming you want the "class" to be an attribute of HTML, and "PageIndex" to be an action parameter, you can do this instead:
<a href="@Url.Action("Index", "Pricing")?PageIndex=2" class="@(ViewBag.PageIndex == 2 ? "ActiveMenuItem" : "")">Pricing</a>
MUSEFAN EDIT:
You can still use ActionLink like this ...
@Html.ActionLink("Pricing", "Index", "Pricing", new {PageIndex = 2}, new {@class = ViewBag.PageIndex == 2 ? "" : "ActiveMenuItem"})
source share