This topic has not yet been rated - Rate this topic

Views.DeleteView Method

Windows SharePoint Services 3
Deletes the specified view of the specified list.

Web Service: ViewsWeb Reference: http://<Site>/_vti_bin/Views.asmx
[SoapDocumentMethodAttribute("http://schemas.microsoft.com/sharepoint/soap/DeleteView", RequestNamespace="http://schemas.microsoft.com/sharepoint/soap/", ResponseNamespace="http://schemas.microsoft.com/sharepoint/soap/", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Wrapped)] 
public void DeleteView (
	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.

Return Value

Returns a System.Web.Services.Protocols.SoapException exception if an error occurs; otherwise, returns an empty value, as shown in the following example:
<DeleteViewResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/" />

The following code example deletes a specified view.

Web_Reference_Folder.Views viewService = new Web_Reference_Folder.Views();
viewService.Credentials= System.Net.CredentialCache.DefaultCredentials;

viewService.DeleteView("List_Name","94276694-2ac3-4f85-8e54-2c5928476a1e");
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ