I am using the Invoice Id number as a Hyperlink in the gridview ItemTemplate column. I need to get that number when the user checks the checkbox of that row. Problem getting the value of that Hyperlink, which is the invoice id, that I need to complete the C# code. I not understanding how to get the value of the Hyperlink control. I see the code will get me the control itself, but no idea how to get the value of the control.
for (int i = 0; i < gv_ebill.Rows.Count; i++)
GridViewRow row = gv_ebill.Rows[i];
bool isChecked = ((CheckBox)row.FindControl("ck_ebill")).Checked;
// trying to get the invoiceid from the row
int invoiceid = row.FindControl("invoiceId").
invoice = new Invoice(Convert.ToInt32(row.Cells.Text), currentClient.Practice.Id);
<asp:TemplateField HeaderText = "Id" SortExpression="id">
ID="invoiceId" runat="server" NavigateUrl='~/Invoice_Overview.aspx?Id=<%# Eval("Id") %>' ><%# Eval("Id") %></asp:HyperLink>