XsltListFormWebPart.GenerateFormXml Method (SPControlMode, SPList)
Generates the form XML for the XsltListFormWebPart using the specified SPControlMode and the specified SPList.
Namespace: Microsoft.SharePoint.WebPartPages
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Syntax
'Declaration
Public Shared Function GenerateFormXml ( _
formMode As SPControlMode, _
list As SPList _
) As String
'Usage
Dim formMode As SPControlMode
Dim list As SPList
Dim returnValue As String
returnValue = XsltListFormWebPart.GenerateFormXml(formMode, _
list)
public static string GenerateFormXml(
SPControlMode formMode,
SPList list
)
Parameters
formMode
Type: Microsoft.SharePoint.WebControls.SPControlModeThe control mode of the current form.
list
Type: Microsoft.SharePoint.SPListThe SharePoint list.
Return Value
Type: System.String
The form XML.
Remarks
If the specified SPControlMode is invalid, this method sets the New. This method generates different XML based on the fields in the specified SPList.