how can i detect which buttoncolumn user clicked when both button are commandname="Select" from code behind?
<p>i have 2 select <code>Button</code> controls in a <code>GridView</code> like this</p>

<pre><code>&lt;asp:datagrid style="Z-INDEX: 0" id="DataGrid1" runat="server" Width="936px"      
HorizontalAlign="Justify" CellPadding="5" AutoGenerateColumns="False" 
AllowCustomPaging="True" AllowSorting="True"&gt;

&lt;asp:ButtonColumn Text="Button 1" CommandName="Select"&gt;
&lt;HeaderStyle Width="5%"&gt;&lt;/HeaderStyle&gt;
&lt;/asp:ButtonColumn&gt;

&lt;asp:ButtonColumn Text="Button 2" CommandName="Select"&gt;
&lt;HeaderStyle Width="5%"&gt;&lt;/HeaderStyle&gt;
&lt;/asp:ButtonColumn&gt;

&lt;/asp:datagrid&gt;
</code></pre>

<p>In code behind in <code>DataGrid1_SelectedIndexChanged</code> how can i detect which button user has clicked</p>

<pre><code>private void DataGrid1_SelectedIndexChanged(object sender, System.EventArgs e)
{
    if(//user click button 1) {}
    else // user clicked button 2 {}
}
</code></pre>

<p>thank for your answer</p>
