title: The parameters dictionary contains a null entry for parameter
body: <pre><code>&lt;%using (Html.BeginForm("OrderDevice", "ImportXML", FormMethod.Post))
  { %&gt;
  
  &lt;table id="OrderDevices" class="data-table"&gt;
      &lt;tr&gt;
  
          &lt;th&gt;
              DeviceId
          &lt;/th&gt;
          &lt;th&gt;
              Id
          &lt;/th&gt;
          &lt;th&gt;
              OrderId
          &lt;/th&gt;
      &lt;/tr&gt;
  
  &lt;% foreach (var item in Model) { %&gt;
  
      &lt;tr&gt;
  
          &lt;td&gt;
              &lt;input readonly="readonly" class="" id="DeviceId" type="text" 
                  name="&lt;%= Html.Encode(item.DeviceId) %&gt;"  
                  value="&lt;%= Html.Encode(item.DeviceId) %&gt;" style="width: 61px" /&gt;
          &lt;/td&gt;
          &lt;td&gt;
              &lt;input readonly="readonly" class="" id="c" type="text" 
                  name= "&lt;%= Html.Encode(item.Id) %&gt;"  value="
      &lt;%= Html.Encode(item.Id) %&gt;" 
                  style="width: 50px" /&gt;      
          &lt;/td&gt;
          &lt;td&gt;
              &lt;input readonly="readonly" class="" id="OrderId" type="text" 
                  name= " &lt;%= Html.Encode(item.OrderId) %&gt;"  
                  value="&lt;%= Html.Encode(item.OrderId) %&gt; " style="width: 49px" /&gt; 
          &lt;/td&gt;
      &lt;/tr&gt;
  
  &lt;% } %&gt;
  
  &lt;/table&gt;
  
  &lt;input type="submit" value="Create"/&gt;
  &lt;%} %&gt;
  </code></pre>
  
  <p>My controller action:</p>
  
  <pre><code>    [AcceptVerbs(HttpVerbs.Post)]
      public ActionResult OrderDevice(int id)
      {   
          try
          {
              // TODO: Add insert logic here        
              orderdevice ord = new orderdevice();
              ord.Id = System.Convert.ToInt32(Request.Form["Id"]);
              ord.OrderId = System.Convert.ToInt32(Request.Form["OrderId"]);
              ord.DeviceId = System.Convert.ToInt32(Request.Form["DeviceId"]);
  
              XMLEntities.AddToorderdevice(ord);
              XMLEntities.SaveChanges();
              return RedirectToAction("Index");
          }
          catch
          {
              return View("Index");
          }
      }
  </code></pre>
  
  <p>When post a form I have this error: The parameters dictionary contains a null entry for parameter 'id' of non-nullable type 'System.Int32' for method 'System.Web.Mvc.ActionResult OrderDevice(Int32)' in 'MvcKVteam.Controllers.ImportXMLController'. An optional parameter must be a reference type, a nullable type, or be declared as an optional parameter.
  Parameter name: parameters</p>
  
  <p>How fix it?</p>