title: Why is my Modal form posting a null model back to the controller
body: <p>I have a partial view that I load in a Modal..in the index view the model div with the HTML.Partial 
  looks like this.</p>
  
  <pre><code>&lt;div class="modal fade" id="modalEditDBInfo" role="application" aria-labelledby="modalEditDBInfoLabel" aria-hidden="true"&gt;
      &lt;div class="modal-dialog"&gt;
          &lt;div class="modalEditDBInfoContent" style="background-color:white; border-radius:10px; box-shadow:10px;"&gt;
              @Html.Partial("_EditDatabaseInfo")
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>the partial view code is</p>
  
  <pre><code>@model Hybridinator.Domain.Entities.Database
  &lt;br /&gt;
  &lt;br /&gt;
  
  &lt;div class="modal-header"&gt;
      &lt;button type="button" class="close" data-dismiss="modal"&gt;&lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;&lt;span class="sr-only"&gt;Close&lt;/span&gt;&lt;/button&gt;
      &lt;h4 class="modal-title" id="editModelTitle"&gt;Edit Database Info&lt;/h4&gt;
  &lt;/div&gt;
  &lt;div class="modal-body"&gt;
      @using (Html.BeginForm("EditDatabaseInfo", "Database", FormMethod.Post, new { @class = "modal-body" }))
      {   
              &lt;div class="form-group"&gt;
                  &lt;div id="databaselabel" &gt;@Html.LabelFor(m =&gt; m.database, "Database")&lt;/div&gt;
                  &lt;div id="databaseedit" &gt;@Html.EditorFor(m =&gt; m.database)&lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="form-group"&gt;
                  &lt;div id="databaseserverlabel" &gt;@Html.LabelFor(m =&gt; m.database_server, "Database Server")&lt;/div&gt;
                  &lt;div id="databaseserveredit" &gt;@Html.EditorFor(m =&gt; m.database_server)&lt;/div&gt;
              &lt;/div&gt;
  
      &lt;div class="modal-footer"&gt;
          &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Cancel&lt;/button&gt;
          &lt;button class="btn btn-inverse btn-primary" type="submit"&gt;Save&lt;/button&gt;
      &lt;/div&gt;
      }       
  &lt;/div&gt;
  </code></pre>
  
  <p>If fire this controller successfully</p>
  
  <pre><code> [HttpPost]
         public ActionResult EditDatabaseInfo(Database database)
         {
             string s = database.database;
             //do other stuff
             return RedirectToAction("Index");
         }
  </code></pre>
  
  <p>Everything works fine up until I try to access the model in the controller post which should be passed into ActionResult method.   The Model object is null</p>
  
  <p><code>Object reference not set to an instance of an object</code>.</p>
  
  <p>anyone see what Im missing here?</p>