Share via

DisplayPost Method

Applies to: SharePoint Foundation 2010

Requests that Microsoft SharePoint Foundation renders the Collaborative Application Markup Language (CAML) assigned to the post body of the form.

<Method ID="Text">
  <SetVar Name="Cmd">DisplayPost</SetVar>
  <SetVar Name="PostBody">CAML</SetVar>
  <SetVar Name="NextUsing">URL</SetVar>
  <SetVar Name="XMLDATA">[TRUE|FALSE]</SetVar>
  <SetVar Name="View">GUID</SetVar>




ID = "Text"

Application-specific string. In an HTML editor compatible with SharePoint Foundation, such as Microsoft Office SharePoint Designer 2007, the string provides the sequence number and name of the method.

Name = "Cmd"

Must be set to DisplayPost.

Name = "PostBody"

Specifies the CAML to render. All data tags contained within the post body must be HTML-encoded. High-byte characters (128-255) that are used in the post body must have UTF-8 encoding.

Name = "NextUsing"

If provided, this parameter specifies the URL to which the user is redirected after the DisplayPost method is executed.

Name = "XMLDATA"

If <SetVar Name="XMLDATA">TRUE</SetVar> is specified in the post, the schema and data of the list are displayed.

Name = "View"

Specifies the GUID of the list view to use. If null, the default view is used.

This parameter can be used to specify the EnumLists operation, which is used with the DisplayPost method to display information about the lists on a specified site. The Microsoft SharePoint Migration Tool (smigrate.exe) uses this operation when backing up SharePoint Team Services by Microsoft sites for migration to Windows SharePoint Services. The syntax of this operation, when embedded in CAML, looks like the following:

<Method ID="0,DisplayPost">
  <SetList Scope="Request">Lists</SetList>
  <SetVar Name="View">EnumLists</SetVar>
  <SetVar Name="Cmd">DisplayPost</SetVar>
  <SetVar Name="XMLDATA">TRUE</SetVar>

The View parameter can also contain the value FileDialogView to display information about all the lists of base type Document Library.

When either EnumLists or FileDialogView is passed as the value of the View parameter, Lists must be specified within a SetList element.


<Method ID="0,DisplayPost">
  <SetVar Name="Cmd">DisplayPost</SetVar>
  <SetVar Name="PostBody">&lt;ows:XML&gt;&lt;ProjectProperty 
  <SetVar Name="NextUsing">http://Server-Name/sites/Site_Name/