Hi,
I want to programatically create list on Sharepoint using Web Services. I tried "Lists.AddList Method" but it would create list in current site only.
Is there any other way to create list? (Using Web Services : C#)
Hi,
I want to programatically create list on Sharepoint using Web Services. I tried "Lists.AddList Method" but it would create list in current site only.
Is there any other way to create list? (Using Web Services : C#)
You can create SPWeb object of the desired location and add list in it dynamically. See following:
http://msdn.microsoft.com/en-us/library/ms425818.aspx
Have you tried this MSDN page, Lists.AddList Method (Lists)?
I think here you can find what you need.
To Create List on specified path
Lists listService = new Lists();
listService.PreAuthenticate = true;
listService.Credentials = new NetworkCredential(username,password,domain;
String url = "http://YourServer/SiteName/"; // put your desired path here
listService.Url = url @ + /_vti_bin/lists.asmx";
XmlNode ndList = listService.AddList(NewListName, "Description", 100);