SPMobileBaseChoiceField.OptionTextLengthLimit Property

Gets the maximum number of characters that any given option in the choice field can have.

Namespace:  Microsoft.SharePoint.MobileControls
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)


Public ReadOnly Property OptionTextLengthLimit As Integer

Dim instance As SPMobileBaseChoiceField
Dim value As Integer

value = instance.OptionTextLengthLimit
public int OptionTextLengthLimit { get; }

Property Value

Type: System.Int32
A Int32 that represents the maximum, set in the mobile web.config file, number of characters that any given choice can have.


To use this property, you must insert an add element into the mobile web.config file (see example) and then override OptionTextLengthLimitKey to return the value that you give to the key attribute of the element.


The following is an example of an add element that sets a limit on the length of an option in a class derived from SPMobileBaseChoiceField.

<add key="mobile_My_Custom_choicefieldoptiontextlengthlimit" value="20" />

See Also


SPMobileBaseChoiceField Class

SPMobileBaseChoiceField Members

Microsoft.SharePoint.MobileControls Namespace