What is the difference between clientContext.Site
and clientContext.Web
when using the Client Object Model?
Asked
Active
Viewed 1,234 times
2

sakura-bloom
- 4,524
- 7
- 46
- 61
1 Answers
2
site
returns an SP.Site object (called "Site Collection" in non-API documentation) and web
returns an SP.Web object (called "Site" in non-API documentation). The web
's Site is the same as site
.
Different operations can be performed upon the different hierarchical objects. Either the Site or the Web will be required depending upon operation (the operations are exposed by the API) - that's all.
See Overview of Sites (aka "SP.Web") and Site Collections (aka "SP.Site") in SharePoint - for how the two different types relate.

user2864740
- 60,010
- 15
- 145
- 220