title: string comparison with MVC razor view
body: <p>I am trying to compare strings using following but it doesn't go inside the if loop</p>
  
  <pre class="lang-cs prettyprint-override"><code>@if (Convert.ToString(ViewData["value"]) == "Exit")
  {  
      &lt;div style="width:100%; border-top:1px solid #999999; padding-top:10px;"&gt; 
      &lt;/div&gt;
  }
  else if (Convert.ToString(ViewData["value"]) == "SessionTimedOut")
  {
      &lt;div style="width:100%; border-top:1px solid #999999; padding-top:10px;"&gt; 
      &lt;/div&gt;
  }
  </code></pre>