Web pages that shoot out-of-band calls need to have one or more trigger events that, when properly
handled with a piece of JavaScript code, place the request via the XMLHttpRequest object.
Trigger events can only be HTML events captured by the browser’s DOM implementation.
The JavaScript code should initiate and control the remote URL invocation, as shown in the
following code:
The sample function accepts two strings: the URL to call and the parameter list. Note that the
format of the query string is totally arbitrary and can be adapted at will in custom implementations.
The URL specified by the programmer is extended to include a couple of parameters.
The first parameter—named outofband in the example—is a Boolean value and indicates
whether or not the request is going to be a custom callback request. By knowing this, the target
page can process the request appropriately. The second parameter—named param in the
example—contains the input parameters for the server-side code.
The host ASP.NET page looks like the following code snippet:
Testing Out-of-band