in

SharePoint Blogs

The Best Place for SharePoint-related Blogs

MdP's MOSS Blog

You want it to do what?

Uses of SPContext

Mirjam's blog lists some uses of SPContext.  Here are a few I grabbed from his post:

SPList currentList = SPContext.Current.List;
SPWeb currentSite = SPContext.Current.Web;
SPSite currentSiteCollection = SPContext.Current.Site;
SPWebApplication currentWebApplication = SPContext.Current.Site.WebApplication;
SPListItem item = (SPListItem)SPContext.Current.Item;
SPUser user = SPContext.Current.Web.CurrentUser;

He also explains the difference between the SPSiteDataQuery object and the SPQuery object.

Check it out here: http://www.sharepointblogs.com/mirjam/archive/2007/02/23/19983.aspx

 
Published Feb 26 2007, 03:25 AM by mdp
Filed under: , , ,

Comments

No Comments

Leave a Comment

(required )  
(optional )
(required )  
Add

Need SharePoint Training? Attend a SharePoint Bootcamp!

Posts (c) their respective authors. Everything else (c) 2007 SharePoint Experts