Recently there was a requirement to create a document library in Sharepoint from an ASP.NET page. I used the following code to achive this:
1. Add a reference to the sharepoint list service web service.
2. I then used the List webservice to create the document library using the code below
Web_Reference_Folder.Lists listService = new Web_Reference_Folder.Lists(); listService.Credentials = new System.Net.NetworkCredential("username", "password"); XmlNode ndList = listService.AddList("document library name", "Type any description for your document library", 101);
Thats it!
–Srihari.
No comments:
Post a Comment