When overridden in a derived class, gets or sets the value of the field in the UI.
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
The default implementation of the getter just returns a null reference (Nothing in Visual Basic). There is no default implementation of the setter.
If the setter is overridden with logic that is appropriate for the type of child control that actually renders the field (such as label or text box); then, whenever the BaseFieldControl loads, is given the same value as ItemFieldValue, or it is given a default value if the field has never been set for the current list item. (ItemFieldValue is the value of the field for the SPField that has the BaseFieldControl as its FieldRenderingControl property.)Notes to Inheritors
When you derive a class directly from BaseFieldControl, you must override the setter and getter for . Among other reasons, this is so that the OnLoad method can give the control the value of ItemFieldValue on first request of the page and so that it can update ItemFieldValue with the user-entered value of on postback.
Any override of the setter or getter must call the EnsureChildControls method (which will create any child controls if they do not already exist). This is normally the very first line of the setter or getter. However, if there would be no point to creating the child controls unless certain properties are not a null reference (Nothing in Visual Basic) and not empty strings, then you may first check for the required values before calling the method.
If the value of BaseFieldControl is changeable by users, your logic should change directly and then call UpdateFieldValueInItem to update ItemFieldValue. This ensures that the appropriate value-changed event occurs. (UpdateFieldValueInItem assumes that you have overridden the getter for .)
The following is an example of an override of the property when the derived field control has the same child controls, of the same types, as the parent class (or when any additional child controls declared by the derived class have constant values that are hard coded in a rendering template). Even in this situation, you should call EnsureChildControls unless you have access to the source code of the parent class's property and can verify that it calls EnsureChildControls. For the full example, see Walkthrough: Creating a Custom Field Type.