Field Name of a Property



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?


Jul 27, 2010 13:57

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.



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

It worked!! Thanks Frederik.

Jul 29, 2010 14:48
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.