共用方式為


SPFormContext.SetFormMode Method

Sets the control mode of the form.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
Public Sub SetFormMode ( _
    mode As SPControlMode, _
    forceSettingFormMlode As Boolean _
)
'Usage
Dim instance As SPFormContext
Dim mode As SPControlMode
Dim forceSettingFormMlode As Boolean

instance.SetFormMode(mode, forceSettingFormMlode)
public void SetFormMode(
    SPControlMode mode,
    bool forceSettingFormMlode
)

Parameters

  • forceSettingFormMlode
    Type: System.Boolean

    true to implement the new control mode in the form even if the form contains controls that are in a different control mode; otherwise, false.

See Also

Reference

SPFormContext Class

SPFormContext Members

Microsoft.SharePoint Namespace