In SharePoint, to query list data we can also use web services provided by SharePoint other than SharePoint API. We can call web services from two places one is JavaScript and another one is .Net client application. Here I will show you both methods. .Net client application To query list data we will use a web service called lists.asmx . 1. Create .net project either windows/console. 2. Add the web reference and the URL looks like http://<servername:portno>/_vti_bin/lists.asmx 3. Give the web reference name as ListsSvc . 3. Add the following code snippet to get list data. ListsSvc. Lists listService = new ListsSvc. Lists (); // If the current user is having access you can use below code listService.Credentials = CredentialCache .DefaultCredentials; // In case if you want to pass specific user credentials listService.Credentials = new NetworkCredential ( "<username>" , "<password>" , "<domain>" ); string v...
Thanks for sharing this
ReplyDeleteSharepoint 2010 Archiving