title: Html.GetEnumSelectList and pre selected values (edit page)
body: <pre><code>    public enum PageType
      {
          [Display(Name = "Brak")]
          None = 0,
          [Display(Name = "Strona")]
          Page = 1,
          [Display(Name = "Sklep")]
          Shop = 2,
          [Display(Name = "Error")]
          Error = 3
      } 
  </code></pre>
  
  <p>View model - <code>ValueTypeEditViewModel</code> containes <code>ValueTypeModel</code> which have <code>Conroller</code> (<code>string</code>)</p>
  
  <p>for dropdown I'm using:</p>
  
  <pre><code>        &lt;div class="form-group"&gt;
              &lt;label asp-for="ValueType.Controller" class="m-1"&gt;&lt;/label&gt;
              &lt;div&gt;&lt;span asp-validation-for="ValueType.Controller" class="text-danger"&gt;&lt;/span&gt;&lt;/div&gt;
              &lt;select class="custom-select" asp-for="ValueType.Controller" asp-items="Html.GetEnumSelectList&lt;ValueTypeModel.PageType&gt;()"&gt;&lt;/select&gt;
          &lt;/div&gt;
  </code></pre>
  
  <p>Which generate perfectly a dropdown, but when I edit page earlier selected <code>Value Type.Controller</code> does not select. Before I save value I have to do some logic with value wchich is a number (string) to transfer it to name and save word. This work like I select <code>[Display(Name = "Strona")] Page = 1,</code> then the <code>Value Type.Controller</code> is a string <code>1</code> and I have to lookup for name and save to db <code>Page</code></p>
  
  <p><strong>Question</strong> how to render dropdown with earlier selected value</p>