I am trying to pass the CustomerID value for codebehind from my LinkButton in a gridview control. I tried the proposed solution here , but it does not work.
My grid code:
<asp:TemplateField HeaderText="Last Name, First Name">
<ItemTemplate>
<asp:LinkButton OnClick="EditCustomer" id="lbtnCustomerName" CommandName="CustomerName" Visible="true" runat="server" ToolTip="Click to edit customer."><%# DataBinder.Eval(Container.DataItem, "custLastName") + ", " + DataBinder.Eval(Container.DataItem, "custFirstName" + ", " + DataBinder.Eval(Container.DataItem, "custID")%></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
protected void EditCustomer(Object sender, EventArgs e)
{
}
How can I get the custID value in the EditCustomer event?
source
share