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 Compiler Error Message: CS0103: The name 'True' does not exist in the current context
<% if(Model.Count < 1)
{%>
No User's Add Under You!
<% } else {
foreach (var item in Model) { %>
<tr>
<td class="usertd"><%= Html.Encode(item.UserName) %> </td>
<td class="usertd"><%= Html.Encode(item.Role) %></td>
<td class="usertd"><%= Html.Encode(item.Email)%> </td>
<td><% if (item.EmailDoc.Equals(True)) { %>
Yes <% } else { %>
No <% } %>
</td>
<td class="usertd"><%= Html.Encode(item.EmailDoc)%></td>
<td class="usertd"><%= Html.Encode(item.PrintDoc)%></td>
<td class="usertd"><%= Html.Encode(item.DownloadDoc)%></td>
<td class="usertd"><input type="button" value="Edit User"/></td>
</tr>
<% }
} %>