title: How to dynamically alter the class of an Html.ActionLink in MVC
body: <p>I'm looking for a way to alter the class of an ActionLink in the controller based on specific criteria (not found in the model so I can't write a conditional in the view itself).  But i can't seem to find the ViewData("name") that allows me to work w/ this element (I assume this is possible, but I'm missing something).</p>
  
  <p>I have an html helper like so in my view</p>
  
  <pre><code>&lt;%=Html.ActionLink("View", "Index", "Home")%&gt;
  </code></pre>
  
  <p>But in my controller I'm not sure how to reference this, like the below to add an attribute like class or onclick.</p>
  
  <pre><code>ViewData("View").attributes.add("class", "active")
  </code></pre>