SharePoint 2013 - SPLessons

Programmatically Create Document Library

Home > > Tutorial
SPLessons 5 Steps, 3 Clicks
5 Steps - 3 Clicks

Programmatically Create Document Library

Programmatically Create Document Library

Introduction In simple terms "A document library is a location on a site where you can create, collect, update, and manage files with team members. Each library displays a list of files and key information about the files, which helps people to use the files to work together". As one of the requirements of a project, I have To Create a  document library  programatically   and create  folders within That particular  SharePoint document library. Step1:  Create  "SampleList" List inside SharePoint,Create the colunms   LibraryName, Location And Description Step2:  In this step we can go ahead and create the Custom Application page.  For this you require Visual Studio 2012. Open Visual   Studio and create a new Empty SharePoint Project ,Select "Deploy as a farm solution" and click on the "Finish" button. Now an empty project will be created Step3: Right Click on The  solution And add a application page. Step4: Design a aspx page  According to our requirement Step5: Inside button click  use the Following code Code : Step6: Build and deploy the solution Step7:  Add a new Item from our custom application page in sharepoint site, Click On Submit Button   Document Library will  be Created with the name  which we  have entered in the textbox. Step8:  In that particular Library two folders will be created
splesons_4_5