Export (0) Print
Expand All

Lists.CheckOutFile Method

Windows SharePoint Services 3
Allows documents in a SharePoint document library to be checked out remotely.

Web Service: ListsWeb Reference: http://<Site>/_vti_bin/Lists.asmx

[SoapDocumentMethodAttribute("http://schemas.microsoft.com/sharepoint/soap/CheckOutFile", RequestNamespace="http://schemas.microsoft.com/sharepoint/soap/", ResponseNamespace="http://schemas.microsoft.com/sharepoint/soap/", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Wrapped)] 
public bool CheckOutFile (
	string pageUrl,
	string checkoutToLocal,
	string lastmodified



A string that contains the full path to the document to be checked out.


A string containing "true" or "false" that designates whether the file is to be flagged as checked out for offline editing.


A string in RFC 1123 date format representing the date and time of the last modification to the file; for example, "20 Jun 1982 12:00:00 GMT".


If this parameter contains a value, the server compares the submitted lastModified value with the stored lastModified value. If the values do not match, the check-out fails and this method returns false.

Return Value

true if the operation succeeded; otherwise, false.

The following example checks out a file from Shared Documents in a subsite.

Web_Reference_Folder.Lists listService = new Web_Reference_Folder.Lists();

listService.Credentials = System.Net.CredentialCache.DefaultCredentials;

string fileCheckout = "http://Server_Name/sites/Subsite/Shared Documents/MyFile.txt";

bool myResults = listService.CheckOutFile(fileCheckout, "true", "20 Jun 2006 12:00:00 GMT");

Community Additions

© 2014 Microsoft