Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Field Name of a Property

Vote:
 

Hi,

Is there a way to get the field name of a property in code behind? Say I have a property with name - 'EaseOfAccess' and its field name as -'Ease of Access'. I need to display the field name for this property.Please can anyone let me know if this is acheivable?

 

#41777
Jul 27, 2010 13:57
Vote:
 

Yes, the PropertyData class exposes the TranslateDisplayName() method that you can use for this. To get the PropertyData for a property just use the Property collection of your PageData object and string literals for your property name.

Example:

 

CurrentPage.Property["MyProperty"] // this return a PropertyData object of your property
#41779
Edited, Jul 27, 2010 14:33
Vote:
 

It worked!! Thanks Frederik.

#41819
Jul 29, 2010 14:48
Vote:
 
#41820
Jul 29, 2010 14:49
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.