I think I'm missing something simple here, but for some reason I'm not figuring it out. I simply want to override some functions of a System.Web.UI.WebControls.Table - but I'm getting this error: The base class includes the field 'Table1', but its type (Store.TestTable)
is not compatible with the type of control (System.Web.UI.WebControls.Table). Some sample snipped code below: TESTTABLE.ASPX
Public Class TestTable1
Inherits System.Web.UI.Page
#Region " Web Form Designer Generated Code "
Protected WithEvents Table1 As JAStore.TestTable
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
TESTTABLE.VB (inheriting class)
Public Class TestTable
Inherits System.Web.UI.WebControls.Table
End Class
You can't do that directly in the html. You either have to create an instance of your derived class and add it to the page dynamically, or you have to turn your derived class into a user control, which could then be added directly to the html. The former is
probably the better option. AutoFed
Jeepaholic
Member
215 Points
43 Posts
Inheriting a WebControls.Table Issue
Aug 06, 2003 09:20 PM|LINK
Public Class TestTable1 Inherits System.Web.UI.Page #Region " Web Form Designer Generated Code " Protected WithEvents Table1 As JAStore.TestTable 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 ClassTESTTABLE.VB (inheriting class)Public Class TestTable Inherits System.Web.UI.WebControls.Table End ClassJeepaholics Anonymous
http://www.jeepaholics.com
russnem
Contributor
7001 Points
1389 Posts
ASPInsiders
MVP
Re: Inheriting a WebControls.Table Issue
Aug 06, 2003 10:18 PM|LINK
Jeepaholic
Member
215 Points
43 Posts
Re: Inheriting a WebControls.Table Issue
Aug 06, 2003 11:16 PM|LINK
Jeepaholics Anonymous
http://www.jeepaholics.com
autofed
Participant
1789 Points
357 Posts
Re: Inheriting a WebControls.Table Issue
Aug 07, 2003 05:35 AM|LINK
Jeepaholic
Member
215 Points
43 Posts
Re: Inheriting a WebControls.Table Issue
Aug 07, 2003 06:23 AM|LINK
Jeepaholics Anonymous
http://www.jeepaholics.com