title: Calling code-behind from button - No overload for matches
body: <p>I have a FormView used to edit records but when the user presses the Button, it also needs to do some back-end stuff in the code-behind. For this I need to pass the ID of the record.</p>
  
  <p>Currently this is my code in the page:</p>
  
  <pre><code>&lt;asp:LinkButton ID="savebtn" runat="server" CausesValidation="True"   
                      CommandName="Update" Text="Save Changes" 
                      OnClick="setProcessProgress"  CommandArgument='&lt;%# Eval("id") %&gt;'  /&gt;
  </code></pre>
  
  <p>And this is a stripped-down version of my code-behind:</p>
  
  <pre><code>protected void setProcessProgress(object sender, FormViewCommandEventArgs e)
          {
             if (e.CommandName == "Update")
                ID_p =   Int32.Parse((string)e.CommandArgument);
          }
  </code></pre>
  
  <p>I'm getting the <code>No overload for 'setProcessProgress' matches delegate 'System.EventHandler'</code></p>
  
  <p>I tried changing the EventArgs to CommandEventArgs and it didn't work either.
  If I use <code>OnCommand</code> instead of <code>OnClick</code> it just doesn't call <code>setProcessProgress</code>. Any ideas?</p>