Sharepoint客户端API。调用自定义功能

时间:2011-05-25 10:17:41

标签: sharepoint sharepoint-2010 client sharepoint-api

我可以从sharepoint client api调用自定义创建的函数吗?

我需要在服务器上调用函数:

public class ClientCallsReciever
{
   public void CustomFunction()
   {
      //A LOT OF CODE ON SERVER
   }
}

因此可以在客户端上执行以下操作:

Context.Completed+=CompletedHandler;

Context.Invoke("CustomFunction");

1 个答案:

答案 0 :(得分:1)

您无法从客户端直接调用服务器上的方法。您需要创建一个Web服务并通过它公开该方法。