Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Hey you Object, Hey you!
Message
De
16/11/2003 06:11:58
Keith Payne
Technical Marketing Solutions
Floride, États-Unis
 
 
À
16/11/2003 01:00:39
Information générale
Forum:
ASP.NET
Catégorie:
Migration
Divers
Thread ID:
00850229
Message ID:
00850406
Vues:
14
>>Hold on a sec, correct me if I'm wrong. <
>
>OK, you're wrong. <g>
>
>If I put the following in the Click EventHandler of MyButton:
>
>MessageBox.Show(this.MyButton.Parent.ToString());
>
>it will display the container that the button is contained in, be it a form, a UserControl, a GroupBox, whatever. It does not display the Button class that MyButton is derived from.
>
>This is in WinForms ... now, granted, I haven't done a lot in WebForms but I'm pretty sure that it works the same in WebForms.
>
>~~Bonnie

It is the same in Web Forms. In the true spirit of encapsulation, there is no way to reference a derived class' base class outside of the class declaration. When dealing with an object in a container (like a Page), the only interface with the base class is through Public, Protected and Friend properties and methods.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform