Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setting a tooltip using Reflection
Message
 
À
23/01/2006 12:34:48
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
ASP.NET
Divers
Thread ID:
01089408
Message ID:
01089462
Vues:
17
>Eric,
>Something like this works for me:
>
> private void SetPropertyValue(string pstrControlName, string pstrPropName, string pstrValue)
> {
>	Control c = this.FindControl(pstrControlName);
>	if ( c != null )
>	{
>		PropertyInfo pi = c.GetType().GetProperty(pstrPropName,pstrValue.GetType());
>		if (pi != null && pi.CanWrite)
>			pi.SetValue(c,pstrValue,null);
>	}
> }
>
Cetin

Have you tried it with Tooltip? That kind of code is working for some properties like Text but not for Tooltip.
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform