v2.0 Note
To implement loading notification prior to the introduction of version 2.0 users to had employ Ajaxium_OnLoadingStateChange function of
the Ajaxium JavaScript API. Starting from version 2.0 that approach is no longer in use.
However, it still offers a good example of using the Ajaxium_OnLoadingStateChange function and
executing any required actions upon beginning or after finishing an AJAX request,
so we have retained that article for your convenience in our archive: v1.x archive - Adding Loading Notification.
Implementing loading notification with Ajaxium
Since sudden changes and flickering controls are a common drawback for AJAX applications, it is good practice to improve the overall filling of the page by showing a progress indicator or simple loading panel during each AJAX-request. Starting from version 2.0, the easiest way to add loading notification is to place standard ASP.NET Panel control onto the Web Form and add the AjaxiumLoading attribute as follows:
<asp:Panel runat="server" id="Panel1" AjaxiumLoading="LOADING TYPE">
<!-- ANY ASP.NET CONTENT. TYPICALLY AN ANIMATED GIF IMAGE. -->
</asp:Panel>
and the Panel will automatically start indicating the application loading state.
Alternatively, you can also use the Ajaxium Panel control (just drag it from the toolbox to your Web Form as any other control) instead of a standard ASP.NET panel control, and set the property AjaxiumLoading to one of supported loading types using the Properties window.
Internally Ajaxium Panel is just a panel control with the AjaxiumLoading and AjaxiumUpdateable properties defined, so you can use it as an extended version of the ASP.NET panel control wherever you wish.
The following types of loading indication are supported
- Static - Panel will be displayed at the location specified during the design-time.
- TrackMouse - Loading panel will hover near the user's mouse during each AJAX request.
- ParentPanel - Loading panel of type ParentPanel must be a child of any other panel control (parent panel).
During an AJAX request the panel will be displayed on top of the parent panel
only if the AJAX request is launched by any control of the same parent panel.
Use panels of this type if your page contains multiple regions updated independently.
|
 |
Off the serious track
Due to Ajaxium's flexible architecture, any standard ASP.NET panel, even that marked with a loading attribute, acts as an AJAX-container for all controls placed therein. So if you wish, you can even modify the controls placed on the loading panel, for example, change url of the image to load.