var controlId = ((LinkButton)gridView1.Rows[0].FindControl("lbName")).Id;
Are you trying to do something like the above?
Update
You can use the OnSelectedIndex event for the GridView to find the selected row.
void GridView_SelectedIndexChanged(Object sender, EventArgs e)
{
GridViewRow row = CustomersGridView.SelectedRow;
var controlId = ((LinkButton)row.FindControl("lbName")).Id;
}
source
share