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)
Syntax
'Declaration
Public ReadOnly Property OptionTextLengthLimit As Integer
Get
'Usage
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.
Remarks
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.
Examples
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" />