Remote Action in Visual Force gives us the ability to make a call asynchronously to the salesforce controller and handle the response in a callback function without making the complete page refresh or waiting for an action. Basically in terms of HTML, this can be treated as an ajax call made through the script tags.
Controller
Lets check the controller now and assume that the namespace of the package is 'namespace'.- global class ControllerName {
- @RemoteAction
- global static String MethodName(Paramters....)
- {
- return 'Hello';
- }
- }
All the remote actions are annotated and static.