title: Confused about OnCommand and CommandName attribute in asp button control
body: <pre><code>&lt;asp:Button ID="btnEditAdd" Text="Edit" 
  CausesValidation="false" CommandName="Edit" Visible="false" runat="server" OnCommand="btnEditAdd_Click"/&gt;
  </code></pre>
  
  <p>How come the above control's got both OnCommand and CommandName attribute? When that button is clicked what method is called ? I don't why I am confused. </p>
  
  <p>I mean the repeater's ItemCommand event is fired or btnEditAdd_Click is called??</p>
  
  <p>I thot they both serve the same purpose.</p>