Partilhar via


SPMobileBaseChoiceField.OptionNumberLimit Property

Gets the maximum number of choices the field can offer to users.

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

Syntax

'Declaration
Public ReadOnly Property OptionNumberLimit As Integer
    Get
'Usage
Dim instance As SPMobileBaseChoiceField
Dim value As Integer

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

Property Value

Type: System.Int32
A Int32 that represents the maximum number of options, set in the mobile web.config file, that the field presents to users.

Remarks

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

Examples

The following is an example of an add element that sets a limit on the number of options a field class derived from SPMobileBaseChoiceField can have.

<add key="mobile_My_Custom_choicefieldoptionnumberlimit" value="10"  />

See Also

Reference

SPMobileBaseChoiceField Class

SPMobileBaseChoiceField Members

Microsoft.SharePoint.MobileControls Namespace