网格视图中的链接按钮

问题描述:

如何在网格视图表中使用链接按钮coloumn

how to use link button in grid view table coloumn

您可以在GridView中使用LinkBut​​ton,方法是在GridView中使用模板字段.

在ItemTemplate中,您可以使用如下所示的链接按钮
You can use LinkButton in GridView, By using Template Fields in the GridView.

In ItemTemplate you can use link button like below
<asp:GridView id="GridView1" runat="server" autogeneratecolumns="False">
<columns>
<asp:TemplateField>
 <itemtemplate>
    <asp:LinkButton text="Operation" id="Lb1" onclick="Click_event" runat="server" />
  </itemtemplate>

</columns>



看看 MSDN文章 [链接1 [ ^ ]
带有确认的GridView删除 [



Have a look at MSDN Article[^]

some useful links
Link 1[^]
GridView Delete, with Confirmation[^]


在各列中添加TemplateField,并在其下添加itemTemplate.
现在您可以在网格视图中使用任何控件了
Add TemplateField in columns, under that add itemTemplate.
now you can any controls in grid view