title: ASP.Net MVC returning value from ActionLink
body: <p>I am building a grid of Payees... Simple grid with a few columns. My view has the following:</p>
  
  <pre><code>&lt;table width="600" cellspacing="3" cellpadding="0" border="0"&gt;
  </code></pre>
  
  <p>
      
      Payee Name
      Used
      Future Payments set
      No. Transactions
  </p>
  
  <p>&lt;% foreach (var p in Model.PayeeListeItems)
     {%>
     
      
      &lt;%=Html.ActionLink("Modify", "Modify", p.PayeeId) %>
      
      &lt;%=p.Name %>
      &lt;%=p.IsUsed.ToString() %>
      &lt;%=p.IsAssignedToBill.ToString() %>
      &lt;%=p.TransactionCount.ToString() %>
      </p>
  
  <p>&lt;%
     }%>
  </p>
  
  <p>It's the ActionLink I am battling with. I have a Modify method in my Controller, but I'm not sure how to get the PayeeId I am trying to pass, which is the selected Payee...</p>
  
  <p>When I click the link at runtime, I get:</p>
  
  <p>The parameters dictionary contains a null entry for parameter 'id' of non-nullable type 'System.Int32' for method 'System.Web.Mvc.ActionResult Modify(Int32)' An optional parameter must be a reference type, a nullable type, or be declared as an optional parameter.
  Parameter name: parameters</p>
  
  <p>My controller method looks like this:</p>
  
  <pre><code>        public ActionResult Modify(Int32 id)
      {
          PayeeDto p = Services.PayeeServices.GetPayeeById(id);
          SinglePayeeItem spi = new SinglePayeeItem
                                    {
                                        Deleted = p.Deleted,
                                        Name = p.Name,
                                        PayeeId = p.PayeeId
                                    };
          return View(spi);
      }
  </code></pre>