kamagra how much to take

Return A Document Library GUID In C#

Answering another development question that was posted in the newsgroups, someone wanted to know assuming that they were aware of the path of an SPFolder object (a subfolder that existed in a SharePoint document library), how to return the GUID of the SharePoint document library that was housing the relevant SPFolder object. This is accomplished through the use of the SPFolder.ContainingDocumentLibrary property out of the Microsoft.SharePoint namespace, which has a return type of GUID, so should work correctly. Here is a quick atomic method that you can adapt to you needs (it’s pretty simple right now :) ) to achieve this:

  1. private readonly SPWeb m_oWeb;
  2.  
  3. public Guid GetSPFolderDocLibGuid(string strPath)
  4. {
  5. return m_oWeb.GetFolder(strPath).ContainingDocumentLibrary;
  6. }
Share

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>