title: NullReferenceException after POST
body: <p>I've got a form that has a dropDownlist using the Model to fill the list, the view is rendered. The issue is that when i press the submit button, a null pointer exception for Model is thrown. I want to receive the value selected in the Post Action.</p>
  
  <p>Here is my code:</p>
  
  <p>Model:</p>
  
  <pre><code>public class BillViewModel
  {
      public List&lt;SelectListItem&gt; ClientList { get; set; }
      public int SelectedClient { get; set; }
  }
  </code></pre>
  
  <p>Controller Action:</p>
  
  <pre><code>public ActionResult Index()
      {
          var billRepo = new BillRepo();
          var bill = new BillViewModel {ListProducts = billRepo.GetAllProducts()};
          bill.ClientList = new List&lt;SelectListItem&gt;();
          List&lt;Client&gt; allClientList = billRepo.GetAllClients();
  
          foreach (Client client in allClientList)
          {
              var item = new SelectListItem() { Value = client.ClientId.ToString(), Text = client.Name };
              bill.ClientList.Add(item);
          }
  
          ViewBag.ClientSelect = new SelectList(billRepo.GetAllClients(), "value",           "text", bill.SelectedClient);
  
          bill.SelectedClient = 1;
          return View(bill);
      }
  
  
      [HttpPost]
      public ActionResult Index(BillViewModel billViewModel)
      {
          return View();
      }
  </code></pre>
  
  <p>View: this is where I get the null pointer exception in <code>Model.ClientList</code></p>
  
  <pre><code>@using (Html.BeginForm())
  {
      @Html.DropDownListFor(item =&gt; item.SelectedClient, Model.ClientList, "Select Client")
      &lt;input type="submit" value="Aceptar"/&gt;
  }
  </code></pre>