title: Display readonly text with MVC Model
body: <p>I have an MVC Model, with a property defined as:</p>
  
  <pre><code>[DisplayName("Service Version")]
  public string ServiceVersion { get; set; }
  </code></pre>
  
  <p>On the screen, I want it to display as:</p>
  
  <blockquote>
    <p>Service Version: <strong>0.1</strong></p>
  </blockquote>
  
  <p>'ServiceVersion' has the version number.</p>
  
  <p>In the view, I have:</p>
  
  <pre><code>@model Main_UI.Models.HomeModel
  </code></pre>
  
  <p>And then:</p>
  
  <pre><code>@Html.LabelFor(m=&gt;m.ServiceVersion) @Html.DisplayText(Model.ServiceVersion)
  </code></pre>
  
  <p>This isn't correct, as I get a nothing displayed for the value part. The label appears, but no version number. What am I doing wrong?</p>
  
  <p>Edit: Changing the </p>
  
  <blockquote>
    <p>@Html.DisplayText(Model.ServiceVersion)</p>
  </blockquote>
  
  <p>, to just </p>
  
  <blockquote>
    <p>@Model.ServiceVersion</p>
  </blockquote>
  
  <p>has fixed it. Is this the right way to do this?</p>