Build a custom field control: Implement the client control
Field controls in Sitefinity CMS provide most of their functionality in client code. As the Sitefinity CMS backend where those controls are used is wholly AJAX-ified and works through services, custom field controls have to provide a client API to be called by Sitefinity CMS. Here is how to implement the client component for a custom field control.
Implement a basic client control
Inherit from the FieldControl client class
Include required properties
Sitefinity CMS expects every field control to have get_value() and set_value() client properties. They should return and save the value of the field, respectively. The implementation is up to you and depends on the UI of your custom field. For simplicity, the following code sample just returns and sets the value of a different DOM element, depending on the current mode (Read or Write).
You can notice the call to raisePropertyChanged in the set_value property. This is a convention in the MS Ajax library that you can use to notify any listeners that the value of a specific property changed.
Use the following code sample: