MustInherit base class inherited by UserControl

  • Thread starter Craig Edmunds via .NET 247
  • Start date
C

Craig Edmunds via .NET 247

Following on from this discussion

http://www.dotnet247.com/247reference/msgs/29/146830.aspx

i'm having the same problem, the classes that i think should work but are throwing up the "type abstract" error are:

########################################
base class:
########################################

Public MustInherit Class ControlBase
Inherits System.Web.UI.UserControl

End Class


########################################
derived class (all code shown):
########################################

Public Class Control
Inherits ControlBase

#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

End Sub

'NOTE: The following placeholder declaration is required by the Web Form Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub

#End Region

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
End Sub

End Class

########################################

If the MustInherit keyword is removed from the base class everything works fine, but this is not the behaviour i want.



Any help will be much appreciated.
 
J

John Saunders

Craig Edmunds via .NET 247 said:
Following on from this discussion

http://www.dotnet247.com/247reference/msgs/29/146830.aspx

i'm having the same problem, the classes that i think should work but are
throwing up the "type abstract" error are:
########################################
base class:
########################################

Public MustInherit Class ControlBase
Inherits System.Web.UI.UserControl

End Class

The designer won't work with an abstract base class. I believe that's fixed
in VS.NET 2005.
 
V

Victor Garcia Aprea [MVP]

Craig, John

Yes, this is already fixed in the VS.NET 2005 beta 1.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top