R – Sharepoint 2007 – read custom page field from webpart

fieldsharepoint-2007web-parts

How do I programatically read a custom page field from within a webpart (from the page the webpart is on)?

Thanks

Jon

Best Answer

Same as you would a non-custom field type:

CustomFieldType customField = (CustomFieldType)page.ListItem["FieldName"];

Only you cast to your custom field type.

Related Topic