title: bind drop down?
body: <p>in the aspx page i am getting this error while binding dropdown list</p>
  
  <blockquote>
    <p>Unable to cast object of type
    'System.Web.Mvc.SelectList' to type
    'System.Collections.Generic.IList`1[System.Web.Mvc.SelectListItem]'.</p>
  </blockquote>
  
  <p>I have written:</p>
  
  <pre><code>&lt;p&gt;
    &lt;label for="categoryId"&gt;Category:&lt;/label&gt;
    &lt;%= Html.DropDownList("categoryId", (IList&lt;SelectListItem&gt;)ViewData["categoryId"])%&gt;
    &lt;%= Html.ValidationMessage("categoryId", "*")%&gt;
  &lt;/p&gt;
  </code></pre>
  
  <p>please tell me the correct way of writing.</p>
  
  <p>thanks</p>
  
  <p>ritz</p>