title: Using Razor, how do I make all "bool?" properties appear as Yes/No/Not Set on details pages?
body: <p>Here's my page code so far:</p>
  
  <pre><code>@model TennisClub.Models.ClubMember
  @{
      ViewBag.Title = "Details";
  }
  &lt;h2&gt;
      Details
  &lt;/h2&gt;
  &lt;fieldset&gt;
      &lt;legend&gt;ClubMember&lt;/legend&gt;
      @Html.DisplayForModel()
  &lt;/fieldset&gt;
  &lt;p&gt;
      @Html.ActionLink("Edit", "Edit", new { id = Model.Id }) |
      @Html.ActionLink("Back to List", "Index")
  &lt;/p&gt;
  </code></pre>
  
  <p>For all the nullable bools (<code>bool?</code>) in my model, this displays a dimmed select list with either Not Set, True, or False. I'd like it to be just plain text: either Not Set, Yes, or No.</p>
  
  <p>How can I achieve this most easily? I'd like this style to be global throughout my site.</p>
  
  <p><strong>Edit</strong></p>
  
  <p>Just took a stab at making a template per Mark's answer, but the details page looks exactly the same.</p>
  
  <p>I created a bool.cshtml file and placed it in the following folder:</p>
  
  <blockquote>
    <p>[ProjectFolder]/Views/Shared/DisplayTemplates</p>
  </blockquote>
  
  <p>Here's what I have for my <strong>bool.cshtml</strong> template at the moment:</p>
  
  <pre><code>@model bool?
  
  @if (Model == null)
  {
      &lt;text&gt;Not Set&lt;/text&gt;
  }
  else
  {
      if (Model.Value)
      {
          &lt;text&gt;Yes&lt;/text&gt;
      }
      else
      {
          &lt;text&gt;No&lt;/text&gt;
      }
  }
  </code></pre>
  
  <p>This doesn't seem to have any affect on my details pages at all.</p>
  
  <p>Any idea what I'm doing wrong?</p>
  
  <p><strong>Edit 2</strong></p>
  
  <p>Here's my model class:</p>
  
  <pre><code>public class ClubMember
  {
      public int Id { get; set; }
      public string FirstName { get; set; }
      public string LastName { get; set; }
      public string EmailAddress { get; set; }
      public string PhoneNumber { get; set; }
      public string PhoneType { get; set; }
      public bool? CanPlayDays { get; set; }
      public bool? CanPlayEvenings { get; set; }
      public bool? CanPlayWeekends { get; set; }
      public string Role { get; set; }
  }
  </code></pre>