sharepoint - Create Document Library using Client Object Model -
just quick question, possible create document library using client object model in sharepoint 2010?
i know can create lists etc. right in saying document library 'special' type of list?
how can specify list create document library?
any appreciated
thanks
yes. can specify templatetype
list
.
using (clientcontext clientctx = new clientcontext(url)) { listcreationinformation lci = new listcreationinformation(); lci.description = "my own doclib"; lci.title = "library"; lci.templatetype = 101; list newlib = clientctx.web.lists.add(lci); clientctx.load(newlib); clientctx.executequery(); }
Comments
Post a Comment