P
Peter Cresswell
Hi guys/gals,
I'm using VS.net 2003 and having trouble with the following:
I am trying to inherit a base class into a web form, but VS will then not
allow me to add any ASP.NET controls using the designer. The base class does
derive from System.Web.UI.Page.
Here's a code snippet:
public class BaseAdminPage : System.Web.UI.Page
{}
public class ContactAdmin : BaseAdminPage
{
private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
}
Can anyone help?
Thanks,
Peter
I'm using VS.net 2003 and having trouble with the following:
I am trying to inherit a base class into a web form, but VS will then not
allow me to add any ASP.NET controls using the designer. The base class does
derive from System.Web.UI.Page.
Here's a code snippet:
public class BaseAdminPage : System.Web.UI.Page
{}
public class ContactAdmin : BaseAdminPage
{
private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
}
Can anyone help?
Thanks,
Peter