Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create Document Library ASP/VB

Status
Not open for further replies.

thankgodfortektips

Programmer
Dec 20, 2005
95
KY
Hi Guys,

I need to know how to programmatically add a document library to a sharepoint site. I have got this code from thread820-1205320...

string url = "SPSite site = new SPSite(url);
SPWeb web = site.OpenWeb();
Guid g = web.Lists.Add("title", "description", SPListTemplateType.DocumentLibrary);

But this is C+ and I dont have the first clue about it.

Any help would be great, thanks in advance...
 
the Below ASP code works for me
Dim url As String = "Dim siteCollection As New Microsoft.SharePoint.SPSite(url)
Dim web As Microsoft.SharePoint.SPWeb = siteCollection.OpenWeb()
web.AllowUnsafeUpdates = true
web.Lists.Add("title", "Description", Microsoft.SharePoint.SPListTemplateType.DocumentLibrary)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top