title: why dropdownlist in mvc4 throws error where mvc3 work well
body: <p>Could you tell me please does MVC4 has different dropdownlist then mvc3?</p>
  
  <p><strong>I made the same test project in mvc4 and mvc 3:</strong></p>
  
  <p>in TransactionController </p>
  
  <pre><code>public ActionResult Create()
  {           
     var listme=db.Transacts.ToList();
     ViewBag.TransactId = new SelectList(listme, "TransactId", "TransactionName");
     return View();
  } 
  </code></pre>
  
  <p><strong>in create view</strong></p>
  
  <pre><code>@model HomeAccounting.Domain.Transaction
  
  ...some code
  
  @using (Html.BeginForm())
  
  ...some code
  
  
  @Html.DropDownList("TransactId",String.Empty)
  
  ...some code
  
  &lt; input type="submit" value="Create" /&gt;
  </code></pre>
  
  <p><strong>Result</strong>
  Dropdown list provides mistake in mvc4 when you submit form. But MVC3 works perfectly
  What is the reason? If mvc4 and mvc3 helpers are different how to find out there difference? F12? but there are almost the same.. do I have to investigate this differences everytime, it's not comfortable?</p>
  
  <p>*<strong><em>Error</strong>
  There is no ViewData item of type 'IEnumerable&lt; SelectListItem >' that has the key « TransactId »</em>*</p>
  
  <p>*<strong>info</strong></p>
  
  <p>public class Transaction</p>
  
  <pre><code>{
  
      public virtual int Id { get; set; }
  
      public int TransactId { get; set; }
  
      public virtual Transact Transact { get; set; }
  
  
  }
  </code></pre>
  
  <p>public class Transact</p>
  
  <pre><code>{
  
      [Key]
  
      public virtual int TransactId { get; set; }
  
      public virtual string TransactionName { get; set; }
  
  }
  </code></pre>