开发者

Creating New list in Sharepoint on specified Path

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.

开发者_Go百科

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);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜