title: Unable to dynamically change class based on ViewBag value
body: <p>Here is my controller code where I have set the value of <code>ViewBag.Val</code> as 1. Now based on this value i'm trying to change the class of an href in my <code>Index</code> view but its not setting the class to <code>Class="A"</code>.
  <code>
  &lt;a @ViewBag.Val==1? class="A":class="B" href="#"&gt;
     Hello
  &lt;/a&gt;
  </code>
   I'm quite new to asp.net MVC, so any help would be appreciated. </p>
  
  <p>But what i get is as shown below:</p>
  
  <pre><code>&lt;a 1="=1?" class="A" :class="B" href="#"&gt;
      Hello
  &lt;/a&gt;
  </code></pre>