title: ASP.Net Form, but date some columns, but not all
body: <p>I have a form with the properties below.  When a request is submitted, it can show the details, which is good, however, when I edit the data, I want to only allow 3 items to be edited (to show if it is in progress and such), however, when I do not include the other items, it resets them all to &quot;null&quot;.  I would like it to retain the original values.  I am not sure if I need to use a separate model for this, or if I can set the values to match what was already there: see below</p>
  <p>Properties:</p>
  <pre><code> public class Request
  {
      public int Id { get; set; }
      public string Name { get; set; }
      public string Preparer { get; set; }
      public string Reviewer { get; set; }
      public string Description { get; set; }
      public string Eligible { get; set; }
      public string RiseDescription { get; set; }
      public int BudgetHours { get; set; }
      public int ActualHours { get; set; }
      public DateTime RequestedDate { get; set; }
      public DateTime TocompleteDate { get; set; }
      public string Drive { get; set; }
      public string Completed { get; set; }
  </code></pre>
  <p>What I want to be edited:</p>
  <pre><code>&lt;div class=&quot;row&quot;&gt;
  &lt;div class=&quot;col-md-4&quot;&gt;
      &lt;form asp-action=&quot;Edit&quot;&gt;
  
          
          &lt;div class=&quot;form-group&quot;&gt;
              &lt;label asp-for=&quot;ActualHours&quot;&gt;&lt;/label&gt;
              &lt;select class=&quot;form-select&quot; name=&quot;ActualHours&quot; id=&quot;ActualHours&quot;&gt;
                  &lt;option value=&quot;1&quot;&gt;1&lt;/option&gt;
                  &lt;option value=&quot;2&quot;&gt;2&lt;/option&gt;
                  &lt;option value=&quot;3&quot;&gt;3&lt;/option&gt;
                  &lt;option value=&quot;4&quot;&gt;4&lt;/option&gt;
                  &lt;option value=&quot;5&quot;&gt;5&lt;/option&gt;
                  &lt;option value=&quot;6&quot;&gt;6&lt;/option&gt;
                  &lt;option value=&quot;7&quot;&gt;7&lt;/option&gt;
                  &lt;option value=&quot;8&quot;&gt;8&lt;/option&gt;
              &lt;/select&gt;
          &lt;/div&gt;
          
          &lt;div class=&quot;form-group&quot;&gt;
              &lt;label asp-for=&quot;Completed&quot;&gt;&lt;/label&gt;
              &lt;select class=&quot;form-select&quot; name=&quot;Completed&quot; id=&quot;Completed&quot;&gt;
                  &lt;option value=&quot;not started&quot;&gt;Not Started&lt;/option&gt;
                  &lt;option value=&quot;in progress&quot;&gt;In Progress&lt;/option&gt;
                  &lt;option value=&quot;completed&quot;&gt;completed&lt;/option&gt;
                  
              &lt;/select&gt;
          &lt;/div&gt;
  
         
  
          &lt;div class=&quot;form-group&quot;&gt;
              &lt;label asp-for=&quot;RiseDescription&quot; class=&quot;control-label&quot;&gt;&lt;/label&gt;
              &lt;input asp-for=&quot;RiseDescription&quot; class=&quot;form-control&quot; /&gt;
              &lt;span asp-validation-for=&quot;RiseDescription&quot; class=&quot;text-danger&quot;&gt;&lt;/span&gt;
          &lt;/div&gt;
  </code></pre>
  <p>I tried setting the other value like this, but it returned the code string:</p>
  <pre><code> &lt;input type=&quot;hidden&quot; name=&quot;Name&quot; value=`@Html.DisplayFor(Model =&gt; Model.Name) id=&quot;Name&quot; asp-for=&quot;Name&quot; /&gt;
  </code></pre>