I have two classes that my pages and controls inherit from. These two classes get the same basic set of information, but as it stands the code is implemented twice. Is there a way to inherit from one base class?
public partial class SessionPage : System.Web.UI.Page
{
protected override void OnInit(EventArgs e)
{
// Loads the session information from the database
// stores in member vars for the page to use
}
}
public partial class SessionControl : System.Web.UI.UserControl
{
protected override void OnInit(EventArgs e)
{
// Loads the session information from the database
// stores in member vars for the user control to use
}
}