Reputation: 4443
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
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