title: input type="hidden" asp-for= does not work for List
body: <p>I'm looking for a smart way to store the values of a List in a <code>hidden input</code> in a form and getting the value back in my viewmodel when the form is posted.</p>
  
  <p>In my viewmodel I have a list with <code>SelectListItem</code> items. The list is used as <code>asp-items</code> in a <code>select</code> element. Now when the user has turned off scrips and posts the form with errors, I want to re-show the form without having to recreate the list.</p>
  
  <p>Property looks like:</p>
  
  <pre class="lang-cs prettyprint-override"><code>public IReadOnlyCollection&lt;SelectListItem&gt; UserLevels { get; set; }
  </code></pre>
  
  <p>In the razor view this will not save the values of UserLevels correctly:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;input type="hidden" asp-for="UserLevels"/&gt;
  </code></pre>
  
  <p>I found <a href="https://stackoverflow.com/questions/9385286/html-hiddenfor-does-not-work-on-lists-in-asp-net-mvc">this question about a similar problem</a>, but I didn't find a nice solution there. Does anybody know a smart way to sore the values of the list?</p>