title: ASP.NET MVC IF condition in View
body: <p>I have a action result method in the conrtoller which returns a IList to my view. Now the Ilist returns set of rows from database. some of the columns in there are bit values. Now 
  when i am displaying those rows , the bit values are being displayed as true and false. I need to check in a IF condition if the value is true then display Yes , else display no. I am getting an error saying  <strong>Compiler Error Message:</strong> CS0103: The name 'True' does not exist in the current context</p>
  
  <pre><code>&lt;% if(Model.Count &lt; 1)
             {%&gt;
                     No User's Add Under You!
          &lt;% } else {
              foreach (var item in Model) { %&gt; 
             &lt;tr&gt;
             &lt;td class="usertd"&gt;&lt;%= Html.Encode(item.UserName) %&gt; &lt;/td&gt;
             &lt;td class="usertd"&gt;&lt;%= Html.Encode(item.Role) %&gt;&lt;/td&gt;
             &lt;td class="usertd"&gt;&lt;%= Html.Encode(item.Email)%&gt; &lt;/td&gt;
             &lt;td&gt;&lt;% if (item.EmailDoc.Equals(True)) { %&gt;
                 Yes &lt;% } else { %&gt;
                 No  &lt;% } %&gt;
             &lt;/td&gt;
             &lt;td class="usertd"&gt;&lt;%= Html.Encode(item.EmailDoc)%&gt;&lt;/td&gt;
             &lt;td class="usertd"&gt;&lt;%= Html.Encode(item.PrintDoc)%&gt;&lt;/td&gt;
             &lt;td class="usertd"&gt;&lt;%= Html.Encode(item.DownloadDoc)%&gt;&lt;/td&gt;
             &lt;td class="usertd"&gt;&lt;input type="button" value="Edit User"/&gt;&lt;/td&gt;
             &lt;/tr&gt;
              &lt;% }
          } %&gt;
  </code></pre>