Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing a control as a reference
Message
De
30/12/2004 21:39:21
 
 
À
30/12/2004 21:37:30
Chris Bohling
Myers and Stauffer LC
Shawnee, Kansas, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
00973454
Message ID:
00973469
Vues:
18
>This code, which uses Reflection, works:
>
>
>Public Class Tests
>   Public Sub PassControlRef(ByVal controlRef As Object)
>      Dim TextProp As System.Reflection.PropertyInfo
>      TextProp = controlRef.GetType.GetProperty("Text")
>      If Not TextProp Is Nothing Then
>         TextProp.SetValue( _
>         controlRef, _
>         "Message: Passing this control as an object reference worked.", _
>         Nothing)
>      End If
>   End Sub
>End Class
>
Thanks
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform