AJAX design pattern practices: Refreshing Ajax application examples + Framework

Source: Internet
Author: User

This article describes how to build a refresh and refreshing AJAX Design Pattern in Ajax design patterns, this section describes the implementation examples of the above design patterns and the latest version of AjaxHelper v0.7 that supports "Refresh Ajax Design Patterns.

Example

You can download the sample program and try it yourself!

Online Demo

Download: RefreshableAjaxSample.zip

This is an Asp. net v1.1 Web Application, click any link in the sample Web page, and try to click the refresh button of the browser, or press F5 to refresh the page, you can see, although the web page function is implemented based on Ajax, the current displayed content will not be lost when the web page is refreshed.

Principle

The implementation principle of "Refresh Ajax Design Pattern" is outlined in the previous article. I will not talk about it here. For details, refer to the sample code!

Framework

The above example is based on the new Version of AjaxHelper DotNet Version 0.7. In the new Version of AjaxHelper, it provides great convenience for implementing the "Refresh Ajax Design Pattern". The specific improvements include:

1. The new Version also provides AjaxHelper DotNet Version and supports other language environments, such as ASP, PHP, ajaxHelper Flat Version (Flat Version does not support JSRS-JavaScript Remote Scripting );

2. encapsulate functions such as Updater and Appender in the previous versions of AjaxHelper into the AjaxHelper namespace. That is, the new functions must be called in the form of AjaxHelper. Updater;

3. Newly Added functions that support "Refresh Ajax design mode" include AjaxHelper. Params, AjaxHelper. Updater2, and AjaxHelper. OnPageLoad.

Among them, AjaxHelper. params is a HashTable, which can be AjaxHelper. params ['paramkey'] obtains the parameters after "#" in the webpage link. AjaxHelper. updater2 usage method and AjaxHelper. the Updater is completely consistent, but provides new implicit support for the "Refresh Ajax Design Pattern". For more information about calling methods, see the Help file or the AjaxHelper article in my Blog; ajaxHelper. onPageLoad () needs to be placed in the onload event of the body element of the webpage to maintain the status when the webpage is refreshed. For details, refer to the usage method in the preceding example.

In addition, note that all the ajaxTemplate parameters in the Flat version must be the complete webpage path, including the extension. In the DotNet version, the ajaxTemplate must be the path pointing to the UserControl, which can contain. the ascx extension. It can be excluded. We recommend that you do not include it.

If you have any questions or suggestions during use, please leave a message!

Download

AjaxHelper_DotNet_v0.7.zip

AjaxHelper_Flat_v0.7.zip

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.