Hi All,
A very simple requirement of creating folder in the document library using web service comes many a times. So here is a simple three liner example that creates a folder in the document library.
All you need to do is add reference to the _vti_bin/DWS.asmx. Document workspace is the web service that manages all related to document workspace or even creating folder in normal team site document libraries.
DWorkSpace is webservice instance reference name.
DWorkSpace.Dws dwspace = new DWorkSpace.Dws();
dwspace.Credentials = System.Net.CredentialCache.DefaultCredentials;
dwspace.Url = "{your_site}/_vti_bin/DWS.asmx";
dwspace.CreateFolder("Shared Documents/DemoFolder");
That is it. You have just created DemoFolder inside Shared Documents library of your site url.
Read More…
A very simple requirement of creating folder in the document library using web service comes many a times. So here is a simple three liner example that creates a folder in the document library.
All you need to do is add reference to the _vti_bin/DWS.asmx. Document workspace is the web service that manages all related to document workspace or even creating folder in normal team site document libraries.
DWorkSpace is webservice instance reference name.
DWorkSpace.Dws dwspace = new DWorkSpace.Dws();
dwspace.Credentials = System.Net.CredentialCache.DefaultCredentials;
dwspace.Url = "{your_site}/_vti_bin/DWS.asmx";
dwspace.CreateFolder("Shared Documents/DemoFolder");
That is it. You have just created DemoFolder inside Shared Documents library of your site url.
