Company      |       Articles & Research      |      Services      |      Software      |      Contact

How to display SharePoint Site Storage

Sometimes you want to display the storage allocated for a particular SharePoint site, and fortunatly the SPSite.UsageInfo structure provides this information. In order to display the site storage for a site, here is the code:

C#:
  1. float single;
  2. try
  3. {
  4. single = (float) (((double) web.Site.Usage.Storage) / 1048576);
  5. }
  6. catch (Exception exception)
  7. {
  8. throw new Exception("Error in Site Storage Collection:
  9. " + exception.ToString());
  10. }

share save 171 16 How to display SharePoint Site Storage

Related posts:

  1. Display A SharePoint Users Role Collection
  2. Pretty Up WebPart Exception Display
  3. Portal Context, User Profile Manager, and User Profile
  4. Interpolating Data Points On A Two Dimensional Regular Grid
  5. What the hell is NaN?

1 Comment »

  1. [...] How to display SharePoint Site Storage [...]

    Pingback by Links (4/10/2007 « Steve Pietrek’s SharePoint Weblog) — April 10, 2007 @ 5:08 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment