Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. SharePoint
  4. Creating Sharepoint Site collections & Document Library under it programmatically

Creating Sharepoint Site collections & Document Library under it programmatically

Scheduled Pinned Locked Moved SharePoint
sharepointtutorial
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    arut jothi
    wrote on last edited by
    #1

    Please provide me pointers (detailed info, if available) on how to create a sharepoint site collection and a document library under it dynamically. Appreciate your time and effort.

    E 1 Reply Last reply
    0
    • A arut jothi

      Please provide me pointers (detailed info, if available) on how to create a sharepoint site collection and a document library under it dynamically. Appreciate your time and effort.

      E Offline
      E Offline
      elizas
      wrote on last edited by
      #2

      In some cases we need to add documents to the doument library programatically, the code snippet below demonstrates how to add a document to the document library . using (SPSite objSite = new SPSite("urlAddress")) { objSite.AllowUnsafeUpdates = true; using (SPWeb oSPWeb = objSite.OpenWeb()) { oSPWeb.AllowUnsafeUpdates = true; //Test1 is the document library SPList docLibrary = oSPWeb.Lists["Test1"]; http://www.mindfiresolutions.com/Programatically-adding-a-document-to-document-library-in-SharePoint-709.php[^]

      Cheers, Eliza

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups