Why can't I inherit my web control?

Yasser

Newcomer
Joined
Jan 19, 2006
Messages
1
Hi, this is my first post in this forum. And I hope you help me.
I am trying to make a subclass from my custom web control. But wherever the definition of the subclass occures, it fires parent's Page_Load without initializing components, and that causes the parent to throw a NullReferenceException, because all controls are not initialized. ny one have ideas on solving this problem?
 
Well if you are using C# did you:

C#:
public class subclass : rootclass
{
      public subclass() : base()
      {

      }
}

Or in VB:
Visual Basic:
Public Class subclass Inherits rootClass
     Public Sub New()
          MyBase.New()
     End Sub
End Class

And in your constructor of your base (root) class is the constructor calling the initalize procedure? Is there anything in your derived (sub) class that needs to be initialized in the constructor call?

You have a very open question that I've answered the best I can with the little bit of information that is there. If you want a better answer posts the classes in their entirety (in a zip file).
 
Back
Top