前台 HTML code
<itemtemplate>
<asp:LinkButton ID="LinkButton1" runat="server" OnClientClick="return confirm('是否删除?');" οnclick="LinkButton1_Click">LinkButton</asp:LinkButton>
</itemtemplate>
后台C# code
protected void LinkButton1_Click(object sender, EventArgs e)
{
//行号
int rowIndex = ((GridViewRow)((LinkButton)sender).NamingContainer).RowIndex;
}