Share via


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)

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

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.

See also

Reference

XsltListFormWebPart class

XsltListFormWebPart members

GenerateFormXml overload

Microsoft.SharePoint.WebPartPages namespace