Sets the control mode of the form.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in microsoft.sharepoint.dll)
Visual Basic (Declaration)
Public Sub SetFormMode ( _
mode As SPControlMode, _
forceSettingFormMlode As Boolean _
)
Dim instance As SPFormContext
Dim mode As SPControlMode
Dim forceSettingFormMlode As Boolean
instance.SetFormMode(mode, forceSettingFormMlode)
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.