title: How to show checked radio button in Razor edit view Asp net core mvc
body: <p>Despite of Asp net core code in Razor view:</p>
  
  <pre><code>@model List&lt;SelectListItem&gt;
  &lt;form asp-controller="Manage" asp-action="Change" method="post"&gt;
      @foreach (SelectListItem item in Model) {
          &lt;br /&gt;
          &lt;input asp-for="@item.Value" type="radio" value="@item.Value" /&gt; @(item.Value + " - " + item.Text)
     }
     &lt;br /&gt;
     &lt;input type="submit" value="OK" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>all radio buttons are checked in browser -> view source</p>
  
  <pre><code>&lt;input type="radio" value="1001" checked="checked" id="item_Value" name="item.Value" /&gt; 1001 - Vilnius&lt;br /&gt;
  &lt;input type="radio" value="1002" checked="checked" id="item_Value" name="item.Value" /&gt; 1002 - Palanga&lt;br /&gt;
  </code></pre>
  
  <p>How it can be all radio buttons checked?</p>
  
  <p>Added:</p>
  
  <pre><code>var lst = new List&lt;SelectListItem&gt;() {
             new SelectListItem {
                  Value = "1001",
                  Text = "Vilnius",
                  Selected = true
              },
              new SelectListItem {
                  Value = "1002",
                  Text = "Trakai",
                  Selected = false
              }
          };
  </code></pre>