Difference between SPSite and SPWeb object.SPSite:
- The SPSite object represents a collection of sites, i.e. Site Collection, a top level site and all its sub sites.
- It is used to get a sub site of a Site Collection.
- It is represented within an SPSiteCollection object that consists of the collection of all site collections in the Web application.
- It contains the various subsites and the information regarding them.
SPWeb:
- The SPWeb object represents an instance of a SharePoint Web, and the SPWeb object contains things like the actual content.
- It represents a SharePoint Foundation website.
- SPWeb object automatically adds the new SPWeb object to an internal list.
- It contains things like the actual content.
|