Popular Articles
Recent comments
- jkll
14 hours 48 min ago - Thank You
1 day 14 hours ago - Another approach
3 days 15 hours ago - Issue
4 days 5 hours ago - thanks
4 days 15 hours ago - Calendar date time
4 days 21 hours ago - Nice Explanation
5 days 1 hour ago - ramya
1 week 22 hours ago - thank a lot
1 week 1 day ago - Very useful, but...
1 week 4 days ago

Extension
The Same Method with Generic Type and Extension Method
public static T FindControlRecursive(this Control.ControlCollection controls, Control control, string controlName) where T : Control
{
if (control.Name == controlName)
{
T returnControl = control as T;
return returnControl;
}
foreach (Control ctrl in control.Controls)(ctrl, controlName);
{
T findControl = controls.FindControlRecursive
if (findControl != null)
{
return findControl;
}
}
return null;
}
Best Regards
Suleyman Ozturk