Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to call a form method from a usercontrol
Message
From
30/08/2003 09:11:29
Keith Payne
Technical Marketing Solutions
Florida, United States
 
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
00824465
Message ID:
00824760
Views:
27
The "proper" way to do this is to define an event in the button and bubble it up to the usercontrol. Then the usercontrol bubbles the event to the parent container.

>Me. on a form will reference that form. That includes events of controls, since the event simply calls up to form methods. So Me.MyMethod() or whatever should do it.
>
>Hope this helps.
>
>yag (sitting in an airport)
>
>>I have a usercontrol that contains a button. I want to place this button on several different forms. When the button is pressed I want the logic to check to see if a method exist on the form containing the usercontrol called "ABC". If so execute it.
>>
>>In FoxPro you could do this by referencing thisform.
>>
>>How would you do this in VB.NET?
>>
>>TIA
>>Robert
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform