title: Using 5th overload of Html.DropDownList causes exception. (does not contain a definition for 'DropDownList' and the best extension method overload..)
body: <p>I have a model with this property</p>
  
  <pre><code>public List&lt;System.Web.Mvc.SelectListItem&gt; ResponseTypes { get; set; }
  </code></pre>
  
  <p>And in my view I have this on my view which causes the error</p>
  
  <p>error CS1928: 'System.Web.Mvc.HtmlHelper' does not contain a definition for 'DropDownList' and the best extension method overload 'System.Web.Mvc.Html.SelectExtensions.DropDownList(System.Web.Mvc.HtmlHelper, string</p>
  
  <pre><code>@Html.DropDownList("ResponseTypeId", "--Select Response Type--", question.ResponseTypes, new { @class = "form-control responseType", @id = "cbxType" })
  </code></pre>
  
  <p>I am trying to use the this overload</p>
  
  <pre><code>public IHtmlString DropDownList(string name, string defaultOption, IEnumerable&lt;SelectListItem&gt; selectList, IDictionary&lt;string, object&gt; htmlAttributes);
  </code></pre>
  
  <p>I can't seem to figure out what's wrong with this code.  I believe I have followed the overload properly.</p>
  
  <p>I have also tried casting it.  I still doesn't work though.</p>
  
  <pre><code>@Html.DropDownList("ResponseTypeId", "--Select Response Type--", (IEnumerable&lt;SelectListItem&gt;)question.ResponseTypes, new { @class = "form-control responseType", @id = "cbxType" })
  </code></pre>