Client Object Model 是SharePoint 2010中新加的一个非常酷的功能。开发者可以从NET客户端上运行的应用程序访问SharePoint 2010,从而大大扩展了sharepoint应用。再也不必‘自古华山一条路’用web-service。

无需编写或安装SharePoint服务器上的代码。Client Object Model使我们能够建立集成的应用程序与SharePoint2010保持区隔,

Client Object Model和Object Model极为相似。

 

Client

Server

Microsoft.SharePoint.Client.ClientContext

Microsoft.SharePoint.SPContext

Microsoft.SharePoint.Client.Site

Microsoft.SharePoint.SPSite

Microsoft.SharePoint.Client.Web

Microsoft.SharePoint.SPWeb

Microsoft.SharePoint.Client.List

Microsoft.SharePoint.SPList

Microsoft.SharePoint.Client.ListItem

Microsoft.SharePoint.SPListItem

Microsoft.SharePoint.Client.Field

Microsoft.SharePoint.SPField

 

在客户端运行需要2个DLL.可以从sharepoint 2010服务器上取得

Microsoft.SharePoint.Client.dll 

Microsoft.SharePoint.Client.Runtime.dll

位置:%ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\ISAPI

 

代码

Dim clientContext AS ClientContext  = new ClientContext(siteUrl)

Dim siteCollection AS Site = clientContext.Site

Dim site AS Web  = clientContext.Web

 

其他的和使用Object Model没有差别。

 

 

相关文章:

  • 2021-09-10
  • 2021-12-18
  • 2021-12-16
  • 2022-02-25
  • 2022-12-23
  • 2021-06-26
  • 2021-11-12
  • 2021-11-01
猜你喜欢
  • 2021-07-12
  • 2021-07-31
  • 2022-02-08
  • 2022-01-06
  • 2022-12-23
  • 2021-09-27
  • 2021-06-01
相关资源
相似解决方案