Author: sepid | Posted on: 4/15/2010 6:27:05 PM | Views : 247

hi,
I want to access a label in templated user control.
I find this code in internet, but it doesn't work.
Error:Object reference not set to an instance of an object.
----------------------------------------------
    public static Control FindControl(Control parent, string id)
    {
        Control recurse;
        if (parent.ID == id)
        {
            return parent;
        }
        foreach (Control child in parent.Controls)
        {
            recurse = FindControl(child, id);
         ...

Go to the complete details ...