在GridView中<ItemTemplate>里添加一个Button,点击Button后输出当前主键?
GridView绑定数据库后.DataKeyField属性是 "id "字段. 
 在 <ItemTemplate> 里添加一个Button,我想实现点击这个Button后输出当前选择的主键?要怎么实现啊?   
 谢谢.   
------解决方案-------------------- <asp:Button CommandName= "a " CommandArgument= ' <%#Eval( "id "%>  '
在GridView的itemcommand事件中
if(e.CommandName ==  "a ")
{
 Response.Write(e.CommandArgument)
}