Our approach is intended for use in ASP.NET applications, and considers the following possible scenarios:
AJAX calls may be performed on different ASP.NET pages of the web application to different remote pages;
A remote page URL may contain dynamically calculated parameters, and it may be more convenient to build a URL string in the code-behind of the ASP.NET page;
A remote page may respond with a complex data requiring parsing before updating an HTML page, that once again may be done in the code-behind of the ASP.NET page;
A remote page may be either an external third party page, or the web application’s own page or service.
All these considerations are illustrated by the diagram below: