SPFormContext.SetFormMode Method (Microsoft.SharePoint)
Sets the control mode of the form.

Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in microsoft.sharepoint.dll)
Syntax

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

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

Parameters

mode

An Microsoft.SharePoint.WebControls.SPControlMode value that specifies the control mode. Possible values include Display, Edit, Invalid, and New.

forceSettingFormMlode

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

Tags :


Page view tracker