Hello
I have the same problem
I tried the same thing as graphicsxp.
I put a break point on my sub in my code behind and it seems that doesn't pass there.
Here is my code
HTML:
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False">
<Columns>
<asp:TemplateField >
<ItemTemplate>
<asp:LinkButton ID="LKBConfirme" CommandName="Select" runat="server">Confirmer</asp:LinkButton>
<asp:LinkButton ID="lnkScrap" CommandName="Scrap" runat="server" CommandArgument='<%# Bind("NO_PRODUIT")%>' Text="Scrap It"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
And here is my code behind
Private Sub GridView1_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles GridView1.RowCommand
If e.CommandName = "Select" Then
Dim Indexligne As Integer = GridView1.SelectedRow.RowIndex
Dim iNoProduit As Integer = Integer.Parse(DirectCast(GridView1.Rows(Indexligne).FindControl("LBLNumeroPersonne"), Label).Text)
iNoProduit = iNoProduit
End If
If e.CommandName = "Scrap" Then
'I do my stuff here
End If
End Sub
What am I doing wrong?