title: How to pass CommandName of LinkButton in GridView to OnClick event
body: <p>Is it possible to pass the CommandName on my LinkButton to the OnClick event within my GridView in Asp.net Webforms (C#)? </p>
  
  <pre><code>&lt;asp:LinkButton ID="DownloadFile" runat="server" Text="Download" OnClick="OpenModal" CommandArgument='&lt;%# Eval("Customer_ID") %&gt;' CommandName="PassThisName"&gt;&lt;/asp:LinkButton&gt;
  </code></pre>
  
  <p>I know it's possible in the RowCommand of the GridView like this:</p>
  
  <pre><code>if (e.CommandName == "PassThisName")
  {
  }
  </code></pre>
  
  <p>But I need to get this value in the OnClick event.</p>