Ievgen
Ievgen

Reputation: 4443

Sharepoint client api. Call custom function

Can i call custom created function from sharepoint client api?

I need to call function on server:

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

So is it possible to do on client something like:

Context.Completed+=CompletedHandler;

Context.Invoke("CustomFunction");

Upvotes: 0

Views: 282

Answers (1)

Rob Windsor
Rob Windsor

Reputation: 6859

You can't directly call a method on the server from the client. You'd need to create a Web service and expose the method through it.

Upvotes: 1

Related Questions