Author: hazz | Posted on: 10/10/2008 7:35:43 AM | Views : 1543

I have a  private Control FindControlRecursive(Control root, string id) which works fine but I want to use the generic version I discovered.

I added the following method into my code behind page but I get the following - Error - Extension methods must be defined in a non-generic static class.

public static T FindControlRecursive(this Control parentControl, string id) where T : Control
{
T ctrl = Go to the complete details ...