Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > MustInherit base class inherited by UserControl

Reply
Thread Tools

MustInherit base class inherited by UserControl

 
 
Craig Edmunds via .NET 247
Guest
Posts: n/a
 
      07-03-2004
Following on from this discussion

http://www.dotnet247.com/247referenc...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.



--------------------------------
From: Craig Edmunds

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>MDwgr/CDzkSs/UVrq7SXyg==</Id>
 
Reply With Quote
 
 
 
 
John Saunders
Guest
Posts: n/a
 
      07-03-2004
"Craig Edmunds via .NET 247" <(E-Mail Removed)> wrote in message
news:ew75$(E-Mail Removed)...
> Following on from this discussion
>
> http://www.dotnet247.com/247referenc...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.
--
John Saunders
johnwsaundersiii at hotmail


 
Reply With Quote
 
 
 
 
Victor Garcia Aprea [MVP]
Guest
Posts: n/a
 
      07-04-2004
Craig, John

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

--
Victor Garcia Aprea
Microsoft MVP | ASP.NET
Looking for insights on ASP.NET? Read my blog:
http://obies.com/vga/blog.aspx

"John Saunders" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> "Craig Edmunds via .NET 247" <(E-Mail Removed)> wrote in message
> news:ew75$(E-Mail Removed)...
> > Following on from this discussion
> >
> > http://www.dotnet247.com/247referenc...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.
> --
> John Saunders
> johnwsaundersiii at hotmail
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
'Class.inherited' v. 'inherited' syntax inside Class 7stud -- Ruby 11 11-09-2007 06:45 PM
web usercontrol + delegates or specialised usercontrol base class info@record-play.com ASP .Net 0 06-23-2006 09:41 AM
Framework 2.x vs. MustInherit? Arthur Dent ASP .Net 2 05-06-2005 02:39 PM
ASP.NET 2 and MustInherit classes? Arthur Dent ASP .Net 0 12-22-2004 05:29 PM
Accessing inherited operator<< in base class from derived class Alicia C++ 3 11-24-2004 03:35 AM



Advertisments