Rick_Fla
Well-known member
Ok, my google skills have failed me. I try and search for the answer but keep getting caught on custom control event, which is not what I want. Here is what I am trying to do.
I have a Class Called SiteUsers. In the class I have an event declared as such:
Inside the class I have a property
Just for a test I was raising the event no matter what, just to make sure things were happy.
On my Code behind File I Declare the object
In the load event the object is getting set with a new statement passing it some needed code.
To capture the BadData event, I have the following
I set a break point on the Sub and it never gets called. What am I missing here? I am new to the ASP.NEt world, so I am not sure what I could be missing, or if the postback stuff is screwing me up. Thanks for any pointers you can hand my way.
I have a Class Called SiteUsers. In the class I have an event declared as such:
Code:
Public Event BadData(ByVal PropertyName as string)
Inside the class I have a property
Code:
Public Property UserName() As String
Get
UserName = m_Username
End Get
Set(ByVal Value As String)
m_UserName = value
RaiseEvent BadData("UserName")
End Set
End Property
Just for a test I was raising the event no matter what, just to make sure things were happy.
On my Code behind File I Declare the object
Code:
Private WithEvents oSiteUser as SiteUser
In the load event the object is getting set with a new statement passing it some needed code.
To capture the BadData event, I have the following
Code:
Private Sub BadData (ByVal PropertyName as string) handles oSiteUser.BadData
Some code
End Sub
I set a break point on the Sub and it never gets called. What am I missing here? I am new to the ASP.NEt world, so I am not sure what I could be missing, or if the postback stuff is screwing me up. Thanks for any pointers you can hand my way.