title: System.ArgumentNullException: Value cannot be null. Parameter name: items
body: <p>I receive the error <code>System.ArgumentNullException: Value cannot be null. Parameter name: items</code> on this line:</p>
  
  <pre><code>@Html.DropDownList("empnames", new SelectList(ViewBag.empnames), "Select");
  </code></pre>
  
  <p>I want to get the corresponding <code>Emp_id</code> from the selected <code>Emp_Name</code> and want to update my table <code>Enq_Submission</code>.</p>
  
  <p>My Model,Controller and Views are as follows:</p>
  
  <p><strong>Model:</strong></p>
  
  <pre><code>namespace MvcConQuery.Models
  {
  
  [Table("Enq_Submission")]
  public class EnquiryModel
  {
  private ConQueryDataClassesDataContext dc = new ConQueryDataClassesDataContext();
  [Key]
  [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
  public Int32 Enq_id { get; set; }
  [Required]
  [Display(Name="Name")]
  public string CustomerName { get; set; }
  [ReadOnly(true)]
  public string Date
  {
  get
  {
  DateTime Date = DateTime.Now;
  return Date.ToString("yyyy-MM-dd"); ;
  }
  
  set{}
  
  }
  
  
  [Required]
  [Display(Name = "Region")]
  public string Region { get; set; }
  [Required]
  [RegularExpression(@"^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$", ErrorMessage = "Entered phone number format is not valid.")]
  [Display(Name = "Phone number")]
  public string Ph_No { get; set; }
  [Required]
  [DataType(DataType.EmailAddress)]
  [Display(Name = "Email_id")]
  public string Email_id { get; set; }
  [Required]
  [Display(Name = "Address")]
  public string Address { get; set; }
  [Required]
  [Display(Name = "Query")]
  public string Query { get; set; }
  public string Referral { get; set; }
  public string Feedback { get; set; }
  public string Status { get; set; }
  public Int32? Emp_id { get; set; }
  public string FollowUpDate { get; set; }
  public List&lt;EmployeeModel&gt; Employees { get; set; }
  
  }}
  
  namespace MvcConQuery.Models
  {
  [Table("Employee_Details")]
  public class EmployeeModel
  {
  
  [Key,Column(Order=0)]
  [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
  //[ForeignKey("EnquiryModel")]
  public Int32 Emp_id { get; set; }
  public string Emp_Name{ get; set; }
  //[Key,Column(Order=1)]
  public string Region { get; set; }
  //[ForeignKey("Region")]
  public string Emp_PhNo { get; set; }
  public string Emp_Address { get; set; }
  public List&lt;EnquiryModel&gt; Enquires { get; set; }
  
  
  }
  
  }
  </code></pre>
  
  <p><strong>Controller:</strong></p>
  
  <pre><code>public ActionResult Edit(int id)
  {
  
  EnquiryModel enquirymodel = db.Enquires.Find(id);
  if (enquirymodel == null)
  {
  return HttpNotFound();
  }
  var rgn=enquirymodel.Region;
  var empnames = (from ename in dc.GetTable&lt;Employee_Detail&gt;() where ename.Region ==rgn select ename.Emp_Name).ToList();
  ViewBag.empnames = empnames;
  
  return View(enquirymodel);
  
  }
  
  [HttpPost]
  public ActionResult Edit(EnquiryModel enquirymodel,string empnames)
  {
  if (ModelState.IsValid)
  {
  
  var empid = (from eid in dc.GetTable&lt;Employee_Detail&gt;() where eid.Emp_Name == empnames select eid.Emp_id).First();
  enquirymodel.Emp_id = empid;
  db.SaveChanges();
  }
  return View(enquirymodel);
  }
  </code></pre>
  
  <p><strong>View:</strong></p>
  
  <pre><code>@model MvcConQuery.Models.EnquiryModel
  
  @{
  ViewBag.Title = "Edit";
  
  }
  &lt;style&gt;
  .myClass label{
  font-weight:bold;
  }
  &lt;/style&gt;
  
  &lt;h2&gt;Allocate Employee&lt;/h2&gt;
  
  @using (Html.BeginForm())
  {
  @Html.ValidationSummary(true)
  
  &lt;fieldset&gt;
  &lt;legend&gt;EnquiryModel&lt;/legend&gt;
  @Html.HiddenFor(model =&gt; model.Enq_id)
  @Html.HiddenFor(model =&gt; model.CustomerName)
  @Html.HiddenFor(model =&gt; model.Date)
  @Html.HiddenFor(model =&gt; model.Region)
  @Html.HiddenFor(model =&gt; model.Ph_No)
  @Html.HiddenFor(model =&gt; model.Email_id)
  @Html.HiddenFor(model =&gt; model.Address)
  @Html.HiddenFor(model =&gt; model.Query)
  @Html.HiddenFor(model =&gt; model.Referral)
  @Html.HiddenFor(model =&gt; model.Feedback)
  @Html.HiddenFor(model =&gt; model.Status)
  @Html.HiddenFor(model =&gt; model.FollowUpDate)
  @Html.HiddenFor(Model =&gt; Model.Emp_id);
  
  
  &lt;div class="editor-label"&gt;
  @Html.LabelFor(model =&gt; model.CustomerName, new { @class = "label" })
  &lt;/div&gt;
  
  @Html.DisplayFor(model =&gt; model.CustomerName)
  
  &lt;div class="editor-label"&gt;
  @Html.LabelFor(model =&gt; model.Region, new { @class = "label" })
  &lt;/div&gt;
  
  @Html.DisplayFor(model =&gt; model.Region)
  
  &lt;div class="editor-label"&gt;
  @Html.LabelFor(model =&gt; model.Ph_No, new { @class = "label" })
  &lt;/div&gt;
  
  @Html.DisplayFor(model =&gt; model.Ph_No)
  
  &lt;div class="editor-label"&gt;
  @Html.LabelFor(model =&gt; model.Email_id, new { @class = "label" })
  &lt;/div&gt;
  
  @Html.DisplayFor(model =&gt; model.Email_id)
  
  &lt;div class="editor-label"&gt;
  @Html.LabelFor(model =&gt; model.Address, new { @class = "label" })
  &lt;/div&gt;
  
  @Html.DisplayFor(model =&gt; model.Address)&lt;div class="editor-label"&gt;
  
  @Html.LabelFor(model =&gt; model.Query, new { @class = "label" })
  &lt;/div&gt;
  
  @Html.DisplayFor(model =&gt; model.Query)
  
  
  @Html.Label("Select Employee", new { @class = "label" })
  @Html.DropDownList("empnames", new SelectList(ViewBag.empnames), "Select");
  
  &lt;p&gt;
  &lt;input type="submit" value="Allocate" name="Submit"/&gt;
  &lt;/p&gt;
  
  &lt;/fieldset&gt;
  }
  
  &lt;div&gt;
  @Html.ActionLink("Back to List", "Index")
  &lt;/div&gt;
  
  @section Scripts {
  @Scripts.Render("~/bundles/jqueryval")
  }
  </code></pre>
  
  <p>Can anyone help me in how I can solve this problem, please?</p>