About      |       Articles      |      Services      |      Software      |      Contact

Latest Free SharePoint Software

ARB Security Solutions regularly releases free SharePoint software, including WebParts, Client Applications, Framework Extensions, and other Miscellaneous Components.
The most recent freeware is:

Title: Simple SharePoint Rollup WebPart
Date Published: 10/22/2009

Previous Two Free WebPart Releases:

SecureCenter For SharePoint

By SharePoint security integrators, for SharePoint security integrators.

SharePoint Security Assurance Program™

For externally facing SharePoint deployments, security is an acutely important deployment concern. Learn how through daily security scanning, you can ensure external business users and partners that they can collaborate in confidence!

Security Assurance WebPart:



Returning Site Directory SPList

Often times it is required to get a reference to the SPList that contains the site directory information, this is an important task when you are considering construction of navigation solutions or when building holistic reporting tools in order to support governance of site sprawl (which is easy to have happen, but sure is a PITA to get cleaned up!). In order to do this, you will use the Microsoft.SharePoint.SPListTemplateType enumeration to specify the type of a list definition or a list template, in this case the value 300 leveraging a direct cast. For example, a simple method to hydrate the coordinating SPList object can be done as such:

C#:
  1. public static SPList ReturnPortalSiteList(SPWeb web)
  2. {
  3. return web.Lists.Cast<SPList>().FirstOrDefault(list => Equals(list.BaseTemplate, (SPListTemplateType) 300));
  4. }

Easy as pie! :)

  • Share/Bookmark

3 Comments »

  1. Adam- Is it safe to return an SPList object using a static modifier?

    Comment by Jeff Dalton — March 28, 2009 @ 11:25 am

  2. Jeff:

    I don’t see why not. All it is indicating is the method does not operate on the specific instance of the class and is callable without instantiating the class. I have a slightly adjusted of the above running in production code and haven’t seen any problems…Is there are particular thing you are concerned about?

    Comment by Adam Buenz — March 28, 2009 @ 11:31 am

  3. Excellent. Exactly what I needed.

    Comment by James R. — April 14, 2009 @ 8:35 am

RSS feed for comments on this post. TrackBack URL

Leave a comment