title: Display a readonly field in ASP.NET Core
body: <p>I am new in ASP.NET Core and would like to ask about displaying a field in w a view. 
  I have a </p>
  
  <pre><code>class Person { 
      public string Name {get; set;} 
      public string Nickname {get; set;} 
  }
  </code></pre>
  
  <p>Typically, in the <code>EditPerson</code> View, I do </p>
  
  <pre><code>&lt;input asp-for="Name" class="form-control" /&gt;
  &lt;input asp-for="Nickname" class="form-control" /&gt;
  </code></pre>
  
  <p>to display the fields. </p>
  
  <p>But in my <code>EditPerson</code> View I need to display <code>Name</code> as readonly, and <code>Nickname</code> as editable field.</p>
  
  <p>The <code>Name</code> should not be in a <em>textbox</em>(even readonly), but rather in a <em>label</em> or <em>div</em>...</p>
  
  <p>Is there a standard approach to display such fields?</p>
  
  <p>I don't want that the field to be updated back to the model or DB, I need only reading the field.</p>