title: ASP.NET Core MVC - Passing Model Data Back to Controller from View
body: <p>Should be a relatively simple question but currently I'm not able to pass model values updated in the view back to the controller.</p>
  <p>As you can see below we have a very simple dropdown list in the view. The 'tenant' string in the Model should be getting set with whichever value is selected in the dropdown list.</p>
  <p>However, when clicking on the submit button the 'tenant' string returns null in the controller...</p>
  <p>What am I missing?</p>
  <p>Thanks!</p>
  <p><strong>Model:</strong></p>
  <pre><code>public class TenantModel
      {
          public List&lt;string&gt; tenantList { get; set; }
  
          public string tenant { get; set; }
      }
  </code></pre>
  <p><strong>View:</strong></p>
  <pre><code>@model TenantModel
  
  @{
      ViewData[&quot;Title&quot;] = &quot;Manage&quot;;
  }
  
  &lt;h1&gt;Manage Databases&lt;/h1&gt;
  
  
  
  @Html.DropDownListFor(m =&gt; m.tenant, new SelectList(Model.tenantList), &quot;Select Tenant&quot;, new { @class = &quot;dropdown&quot;, @style = &quot;width: 220px&quot; })
  
  &lt;br /&gt;
  
  
  &lt;button type=&quot;submit&quot; onclick=&quot;location.href='@Url.Action(&quot;DropDbs&quot;, &quot;Environments&quot;, Model)'&quot; class=&quot;btn btn-danger&quot;&gt;Destroy&lt;/button&gt;
  </code></pre>
  <p><strong>Controller</strong></p>
  <pre><code>    public class EnvironmentsController : Controller
      {
  
          public IActionResult Manage()
          {
              var tenantModel = new TenantModel();
              
              tenantModel.tenantList = Utils.TenantList();
              
              return View(tenantModel);
          }
          
          
          public IActionResult DropDbs(TenantModel tenantModel)
          {
              
              return RedirectToAction(&quot;Manage&quot;);
          }
      }
  </code></pre>