<asp:TemplateField HeaderText="编辑"><ItemTemplate>
<asp:ImageButton id="Imagebutton3" runat="server" ImageUrl="../img/edit.gif" CommandName="edit" AlternateText="Edit this item"></asp:ImageButton>
</ItemTemplate></asp:TemplateField>
<asp:TemplateField HeaderText="删除"><ItemTemplate> <asp:ImageButton id="Imagebutton4" runat="server" ImageUrl="../img/delete.gif" CommandName="delete" AlternateText="Delete this item"></asp:ImageButton> </ItemTemplate> </asp:TemplateField>
(按钮实现删除编辑)另外: <Columns>
<asp:CommandField HeaderText="修改" ShowEditButton="True" ShowHeader="True" />
<asp:CommandField HeaderText="删除" ShowDeleteButton="True" ShowHeader="True" />
</Columns>
<asp:ImageButton id="Imagebutton3" runat="server" ImageUrl="../img/edit.gif" CommandName="edit" AlternateText="Edit this item"></asp:ImageButton>
</ItemTemplate></asp:TemplateField>
<asp:TemplateField HeaderText="删除"><ItemTemplate> <asp:ImageButton id="Imagebutton4" runat="server" ImageUrl="../img/delete.gif" CommandName="delete" AlternateText="Delete this item"></asp:ImageButton> </ItemTemplate> </asp:TemplateField>
(按钮实现删除编辑)另外: <Columns>
<asp:CommandField HeaderText="修改" ShowEditButton="True" ShowHeader="True" />
<asp:CommandField HeaderText="删除" ShowDeleteButton="True" ShowHeader="True" />
</Columns>