Reiner Max" <> wrote in message
news:18kyh3b03mk4l$.13os3md5xmyrn$.. ..
> Hello i try do this.
>
> Class DemoBase
> Public Delegate Sub DemoItemEventHandler(ByVal sender As Object, ByVal e _
> As DemoItemEventArgs)
>
> Public Event ItemCreated(ByVal e As DemoItemEventArgs)
First of all, you want:
Public Event ItemCreated As DemoItemEventHandler
> Protected Sub OnItemCreated(ByVal e As DemoItemEventArgs)
> RaiseEvent ItemCreated(e)
> End Sub
> End Class
>
> So now I like to fire the event ItemCreated from this class
>
> Class DemoItems
Second, you need
Public Class DemoItems
Inherits DemoBase
Public Function createDemoItems() ' Get into the habit of specifying
accessability
> .............................
> e.Control = td
> OnItemCreated(e)
> End Function
> End Class
>
> then I access this event from my aspx page
>
> Sub DemoBuilder1_ItemCreated(ByVal sender As Object, ByVal e As
> DemoBuilder.DemoItemEventArgs) Handles DemoBuilder1.ItemCreated
> End Sub
>
> My reason for this way is i can't access events in the class DemoItems
> from my aspx page.
Exactly what error do you see or what problem do you have?
--
John Saunders
johnwsaundersiii at hotmail
|