![]() |
|
![]() | ||
|
Subject:
Trapping raised events in usercontrols with ASP.net and VB.net
Category: Computers Asked by: ssijpst8-ga List Price: $5.00 |
Posted:
03 Jul 2004 11:58 PDT
Expires: 06 Jul 2004 19:52 PDT Question ID: 369287 |
I am ABLE to trap an event raised by a control within the Main Form (a), but I am NOT able to do the reverse, that is trap an event in a usercontrol raised by the main Form or by another usercontrol. Below is what works for (a) What I want is VB.net code showing the reverse trapping an event within a usercontrol, raised by another usercontrol or Main Form. WORKING EXAMPLE (a) WITHIN USERCONTROL- Public Event myEvent(ByVal sender As System.Object, ByVal e As System.EventArgs) Private Sub Button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click RaiseEvent myEvent(sender, e) WITHIN MAIN FORM Protected WithEvents WebUserControl11 As Event1.WebUserControl1 Private Sub Button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles WebUserControl11.myEvent Response.Write("<b>This is main sending 1</b><br>") End Sub |
![]() | ||
|
There is no answer at this time. |
![]() | ||
|
Subject:
Re: Trapping raised events in usercontrols with ASP.net and VB.net
From: markruse-ga on 04 Jul 2004 15:53 PDT |
Could you explain further what you are trying to achieve usually due to object encapulation events are raised inside an object to indicate to the outside world that something has happened. ie click/mouseover etc. If the outside world wants to interact with the object usually a method is called. I may have the wrong end of the stick to your problem, can you give me some more detail on what you are trying to achieve. |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |