Try Now
More in this section

Forums / Developing with Sitefinity / Codebehind multi herited by usercontrols

Codebehind multi herited by usercontrols

1 posts, 0 answered
  1. Pierre
    Pierre avatar
    433 posts
    16 Feb 2006
    14 Jul 2010
    Link to this post
    Hi team,

    I have some usercontrols inheriting always same codebehind. These UC are used as templates for repeaters and others custom sf codes. it's possible to make this codebehind heritable as class derivated from base Usercontrol  to use in my uc from some dll. What is the best method to cast the controls outside this classe(repeater sample)? I have make one but i not sure about the performance. Other tips? thanks.

    namespace Space
        class RenderClass
            public partial class RenderTemplate: UserControl
                //custom code  
             public static Repeater Repeater1
                get { return (Repeater)FindControlRecursive((Page)HttpContext.Current.Handler, "Repeater1"); }
1 posts, 0 answered