A
Arturo Buonanni
Hello,
I'm writing a web app in wich I'm using some Web User Controls. Now I
want these controls to have some basic properties so I've defined my
own class that inherits from System.Web.UI.UserControl, defined some
properties and some code and made my actual Web User Controls inherits
from my class.
In my class I've also defined a public event but this event is not
available to the containers of the web user controls that inherits
from this class.
This is how my base user control class is defined:
<Serializable()> Public Class myContext
Public CurrentContext As String
Public Content As String
Public Description As String
Public Tag As Object
Public ParentContext As myContext
Public Sub New()
{...init here...}
End Sub
End Class
Public Class myUserControl
Inherits System.Web.UI.UserControl
Public mContext As New myContext
Public Event OnContextSetB(ByVal mCont As myContext)
Protected Sub SetContextA(ByVal mCont As myContext)
{...some code here...}
RaiseEvent OnContextSetB(mCont)
End Sub
Hope someone can help.
Thanks.
I'm writing a web app in wich I'm using some Web User Controls. Now I
want these controls to have some basic properties so I've defined my
own class that inherits from System.Web.UI.UserControl, defined some
properties and some code and made my actual Web User Controls inherits
from my class.
In my class I've also defined a public event but this event is not
available to the containers of the web user controls that inherits
from this class.
This is how my base user control class is defined:
<Serializable()> Public Class myContext
Public CurrentContext As String
Public Content As String
Public Description As String
Public Tag As Object
Public ParentContext As myContext
Public Sub New()
{...init here...}
End Sub
End Class
Public Class myUserControl
Inherits System.Web.UI.UserControl
Public mContext As New myContext
Public Event OnContextSetB(ByVal mCont As myContext)
Protected Sub SetContextA(ByVal mCont As myContext)
{...some code here...}
RaiseEvent OnContextSetB(mCont)
End Sub
Hope someone can help.
Thanks.