Load the page and any related resources.



Page.Load [async]


Name   Type   Description
async Boolean

Whether to load the page asynchronously. This is an optional parameter that defaults to false.



Use this method to load the page and any related resources.

You do not need to call this method before you call the Save method. If the page has not been loaded when the Save method is called then the Save method will automatically call Load for you.

By default the load method will not return until page loading is over. This will be when all the requisite resources have been obtained or if the timeout period is exceeded. If the data is being obtained over the Internet it may take some time to obtain all the data.

You can choose to start page loading asynchronously. In this case the Load method will start loading the data for that page in the background and then return immediately. This is particularly useful if you want to load a number of pages simultaneously. By creating a number of Pages and loading them asynchronously before saving, you will dramatically reduce rendering time.

Asynchronous loading should be used with care. Suppose you have a web page that displays thumbnails of other web pages. What would happen if you were to ask it to make a thumbnail of itself? You might send your server into an infinite loop as the page requested itself over and over again. There are safeguards in place to stop this happening but these cannot work effectively if you are operating asynchronously.