This documentation is archived and is not being maintained.

Forms.GetFormCollection Method

Windows SharePoint Services 3
Returns the URLs and types of the forms for a list.

Web Service: FormsWeb Reference: http://<Site>/_vti_bin/Forms.asmx

[SoapDocumentMethodAttribute("", RequestNamespace="", ResponseNamespace="", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Wrapped)] 
public XmlNode GetFormCollection (
	string listName



String that contains the internal name of the list.

Return Value

An XML fragment in the following form that contains the URL and type for the form, and that can be assigned to a System.Xml.XmlNode object.
<Forms xmlns="">
   <Form Url="Lists/List_Name/DispForm.aspx" Type="DisplayForm" />
   <Form Url="Lists/List_Name/EditForm.aspx" Type="EditForm" />
   <Form Url="Lists/List_Name/NewForm.aspx" Type="NewForm" />

The following code example displays the URLs and types of the forms for a list.

This example requires that a using (Visual C#) or Imports (Visual Basic) directive be included for the System.Xml namespace.

Web_Reference_Folder_Name.Forms formService = 
    new Web_Reference_Folder_Name.Forms();
formService.Credentials= System.Net.CredentialCache.DefaultCredentials;

XmlNode ndForms = formService.GetFormCollection("List_Name");