Views.GetView Method
Windows SharePoint Services 3
Returns the schema of the specified view for the specified list.
Web Service: ViewsWeb Reference: http://<Site>/_vti_bin/Views.asmx
[SoapDocumentMethodAttribute("http://schemas.microsoft.com/sharepoint/soap/GetView", RequestNamespace="http://schemas.microsoft.com/sharepoint/soap/", ResponseNamespace="http://schemas.microsoft.com/sharepoint/soap/", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Wrapped)] public XmlNode GetView ( string listName, string viewName )
Parameters
- listName
A string that contains the internal name of the list.
- viewName
A string that contains the GUID for the view. If the view name is blank, the default view is returned.
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.<View Name="{EE7C652F-9CBF-433F-B376-86B0EE989A06}" DefaultView="TRUE" Type="HTML" DisplayName="View_Name" Url="Lists/Events/File_Name.aspx" BaseViewID="1"> <Query> <Where> <Leq> <FieldRef Name="Created"/> <Value Type="DateTime">2003-03-03T00:00:00Z</Value> </Leq> </Where> </Query> <ViewFields> <FieldRef Name="fRecurrence"/> <FieldRef Name="Attachments"/> <FieldRef Name="WorkspaceLink"/> <FieldRef Name="LinkTitle"/> <FieldRef Name="Location"/> <FieldRef Name="EventDate"/> <FieldRef Name="EndDate"/> </ViewFields> <RowLimit Paged="TRUE">100</RowLimit> </View>
The GetView method does not return the following parts of the CAML view, which contain HTML: Toolbar, ViewHeader, ViewBody, ViewFooter, PagedRowSet, and RowLimitExceeded. To return the full view definition, including these HTML sections, use the GetViewHtml method instead.