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:



Iterating Through All WebParts On Page

One of my friends instant messaged me this morning and asked if it was feasible to use a method that would take an SPWeb object, and a URL as a parameter in order to return a collection of all the WebParts that coordinated with the URL. I haven't tested this method, but this is what I put together for him:

C#:
  1. private static List<WebPart> GenerateWebPartCollection(SPWeb web, string url)
  2. {
  3. // Create A New SPLiimitedWebPartManager object to perform some WebPart operations on the page
  4. SPLimitedWebPartManager splwManager = web.GetLimitedWebPartManager(url, PersonalizationScope.Shared);
  5.  
  6. // Create a new generic collection that represents all the WebParts we found
  7. List<WebPart> wpCollection = new List<WebPart>();
  8.  
  9. // Loop through all the WebParts that are available
  10. foreach (WebPart webpart in splwManager.WebParts)
  11. {
  12. // if the generic collection does not contains that WebPart, add it
  13. if (wpCollection.Contains(webpart))
  14. {
  15. wpCollection.Add(webpart);
  16. }
  17. }
  18.  
  19. // return the generic collection of WebParts to get consumed later
  20. return wpCollection;
  21. }

Its a pretty simple method, the return should just be a colleciton of the WebPart objects that can be used later for whatever his application was attempting to do.

  • Share/Bookmark

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment