Views.GetViewHtml Method
Windows SharePoint Services 3
Returns the full schema of the specified view for the specified list, including the HTML sections.
Web Service: ViewsWeb Reference: http://<Site>/_vti_bin/Views.asmx
[SoapDocumentMethodAttribute("http://schemas.microsoft.com/sharepoint/soap/GetViewHtml", RequestNamespace="http://schemas.microsoft.com/sharepoint/soap/", ResponseNamespace="http://schemas.microsoft.com/sharepoint/soap/", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Wrapped)] public XmlNode GetViewHtml ( string listName, string viewName )
Parameters
- listName
A string that contains the name of the list.
- viewName
A string that contains the GUID specifying the view.
Return Value
A fragment in Introduction to Collaborative Application Markup Language (CAML) in the following form that contains the view schema and can be assigned to a System.Xml.XmlNode object.<GetViewHTMLResult> <View Name="{C1036607-EC8A-11d3-82AA-0050048394B0}" DefaultView="TRUE" Type="HTML" DisplayName="All Contacts" Url="Lists/Contacts/AllItems.htm" BaseViewID="1" xmlns=""> <ViewHeader> ... </ViewHeader> <ViewBody> ... </ViewBody> <ViewFooter> ... </ViewFooter> <GroupByHeader> ... </GroupByHeader> <GroupByFooter> ... </GroupByFooter> <PagedRowset> ... </PagedRowset> <PagedRecurrenceRowset> ... </PagedRecurrenceRowset> <ViewEmpty> ... </ViewEmpty> <ViewBidiHeader> ... </ViewBidiHeader> <Toolbar Type="Standard"> ... </Toolbar> <ViewFields> <FieldRef Name="LinkTitle" /> <FieldRef Name="FirstName" /> <FieldRef Name="Company" /> <FieldRef Name="WorkPhone" /> <FieldRef Name="HomePhone" /> <FieldRef Name="Email" /> </ViewFields> <Query> <OrderBy> <FieldRef Name="Title" /> <FieldRef Name="FirstName" /> </OrderBy> </Query> <Aggregations> <FieldRef Name=”Column1” Type=”Minimum”> </Aggregations> <RowLimit Paged="TRUE">100</RowLimit> </View> </GetViewHTMLResult>