我有這樣的GridView:GridView識別點擊行值?
<div class="content">
<asp:GridView ID="DocumentGrid" runat="server" AutoGenerateColumns="False" OnRowCommand="DocumentGrid_RowCommand" >
<Columns>
<asp:BoundField HeaderText="ID" DataField="ID" ItemStyle-Width="120px"/>
<asp:ButtonField HeaderText="Download Link" Text="Download"/>
</Columns>
</asp:GridView>
</div>
正如你所看到的,DocumentGrid_RowCommand被稱爲當「下載」按鈕被按下時,我怎樣才能找出的值是被點擊了該行的?
我問過類似的問題在這裏一段時間回來。也許[這](http://stackoverflow.com/questions/8363202/in-c-how-can-i-reference-a-specific-product-record-based-on-a-button-thats-cl)將幫幫我。 – 2011-12-29 13:20:27
or this http://stackoverflow.com/questions/5619630/getting-boundfield-value-in-gridview-row-command – 2011-12-29 13:37:10