Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting a tooltip using Reflection
Message
 
To
23/01/2006 12:34:48
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
ASP.NET
Miscellaneous
Thread ID:
01089408
Message ID:
01089462
Views:
18
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform