title: Submit form over a select element in ASP.Net MVC
body: <p>So in my file i have this working example of submitting a form and initiating a controller action. And in this form there is a functioning select element and it works as expected, the controller is able to retrieve the value in the select element.</p>
  
  <pre><code>@using (Html.BeginForm("InsertEntry", "Modeliai"))
  {
      &lt;div class="row"&gt;
          &lt;div class="col-7"&gt;
              &lt;input type="text" class="form-control" placeholder="Pavadinimas" name="Pavadinimas"&gt;
          &lt;/div&gt;
          &lt;div class="col-3"&gt;
              &lt;select class="selectpicker" data-live-search="true" name="fk_MARKEid"&gt;
                  @foreach (var item in Model.Markes)
                  {
                      &lt;option data-tokens="@item.pavadinimas" data-content="@item.pavadinimas"&gt;@item.id&lt;/option&gt;
                  }
              &lt;/select&gt;
          &lt;/div&gt;
          &lt;button type="submit" class="btn btn-success"&gt;Add&lt;/button&gt;
      &lt;/div&gt;
  }
  </code></pre>
  
  <p>But when i try to add select element in the table row, controller somehow doesn't catch the value of the select element.</p>
  
  <pre><code>@using (Html.BeginForm("UpdateEntry", "Modeliai"))
  {
      &lt;td&gt;
           &lt;input type="hidden" name="id" value="@item.id" /&gt;
           &lt;input type="text" name="pavadinimas" class="form-control" value="@item.pavadinimas" /&gt;
      &lt;/td&gt;
      &lt;td&gt;
          &lt;select class="selectpicker" data-live-search="true" name="fk_MARKEid"&gt;
              @{
                  var ignore = Model.Markes.FirstOrDefault(x =&gt; x.id == item.fk_MARKEid);
              }
  
              @foreach (var x in Model.Markes)
              {
                  if (ignore?.id == x.id)
                  {
                      &lt;option data-tokens="@ignore?.pavadinimas" data-content="@ignore?.pavadinimas" selected="selected"&gt;@ignore?.id&lt;/option&gt;
                  }
  
                  &lt;option data-tokens="@x.pavadinimas" data-content="@x.pavadinimas"&gt;@x.id&lt;/option&gt;
              }
  
              &lt;/select&gt;
      &lt;/td&gt;
      &lt;td style="width: 100px"&gt;
          &lt;button class="close" type="submit"&gt;
              &lt;i class="fas fa-pencil-alt" style="font-size: smaller"&gt;&lt;/i&gt;
          &lt;/button&gt;
      &lt;/td&gt;
  }
  </code></pre>
  
  <p>Yes i tried checking if select element names and model names match.</p>
  
  <p>Any help regarding making the second form work or explanation why does this happen would be appreciated</p>