title: @Html.DropDownListFor does not contain a definition for
body: <p>Not sure what I'm missing here. I'm trying to display a dropdown list with records from my country table.</p>
  
  <p><strong>My Model</strong></p>
  
  <pre><code>public ClientSMSAccountCustom()
  {
      this.Countries = new List&lt;SelectListItem&gt;();
  }     
  public IList&lt;SelectListItem&gt; Countries { get; set; }
  </code></pre>
  
  <p><strong>My Controller</strong></p>
  
  <pre><code>//get all countries
  var countries = rad.Countries.OrderBy(x =&gt; x.CountryID).ToList();
  
  foreach (var c in countries)
  {
      SelectListItem item = new SelectListItem();
      item.Text = c.Description;
      item.Value = c.CountryID.ToString();
      model.Countries.Add(item);
  }
  </code></pre>
  
  <p><strong>My View</strong></p>
  
  <pre><code>@Html.DropDownListFor(model =&gt; model.CountryID, Model.Countries)
  </code></pre>
  
  <p><strong>This is the exact error</strong></p>
  
  <blockquote>
    <p>'TotalDesk.Models.ClientSMSAccountCustom' does not contain a definition for 'CountryID' and no extension method 'CountryID' accepting a first argument of type 'TotalDesk.Models.ClientSMSAccountCustom' could be found (are you missing a using directive or an assembly reference?)</p>
  </blockquote>
  
  <p><code>TotalDesk.Models.ClientSMSAccountCustom</code> is the model class</p>