Hi! in future post, try using the code block :-D just for better understanding of the code :thumbsup: Well, the Control, must be a GridView, so you can add
public static Control FindControlRecursive(Control Root, string Id)
{
if (Root.ID == Id)
return ((GridView)Root);
if (Root is GridView)//or some like that (i don't remember well)
{
GridView gv = ((GridView)Root);
Int32 num = 3;//Based zero, number of column where is the link button column
Int32 row = 1;//Based zero, number of row where is the link button row
Control FoundCtl = ((Control)gv.Rows[row].Cells[num].FindControl(Id));
if (FoundCtl != null)
return FoundCtl;
}
return null;
}
Remember that in ASP.NET the dinamically controls added like in grid view Template field, have the same name, except in Client-Side. if you want a especific row, you only need to change the row parameter ;)