Atlas updatepanel usage tips and FAQs

Source: Internet
Author: User

Many developers willUpdatepanelThe control is gradually exposed to Atlas. Updatepanel is powerful and easy to use. It also brings us closer to Atlas.

I once posted a brief introduction to updatepanel (http://dflying.cnblogs.com/archive/2006/03/25/358547.html) and got a lot of feedback and questions. I think it is necessary to summarize these questions and tips for using updatepanel into a post. Hope to help. Here, I would like to thank a, Dudu, and all the friends who raised questions or participated in the discussion, so that I can have a deeper understanding of updatepanel.

First, the most important thing is to pay attention to Atlas's hometown: http://atlas.asp.net /. We know that Atlas is a new framework under development and changes occur every month or even every week. Therefore, as an atlas developer, you often pay attention to http://atlas.asp.net/. you will get the latest content, the latest features, and the latest demos. For beginners, visit http://atlas.asp.net/docsto refer to the atlasapiand classdocument (not all of them have been completed yet. Please pay more attention to it ). Below are some personal websites/blogs of core figures of atlas and ASP. NET, which are also worth visiting frequently ):

  1. Http://blogs.msdn.com/brada/
  2. Http://weblogs.asp.net/scottgu/
  3. Http://www.nikhilk.net/
  4. Http://weblogs.asp.net/bleroy/
  5. Http://blogs.msdn.com/jhawk/

Tips for using the Atlas updatepanel Server Control:

  1. Be sure to setScriptmanagerEnablepartialrenderingThe property isTrue. Many people complained to me that their updatepanel does not work in Ajax mode but still triggers a general full-page PostBack, because this attribute is not set.
  2. Set updatepanel to triggerIs a server control.. Because regardlessControlvaluetriggerOrControleventtriggerThe specified attributes/events are server-side attributes/events. Only updatepanel PostBack can be triggered when the server-side attribute changes or the server-side sends an event.
  3. Difference between updatepanelTwo update Methods:AlwaysAndConditional. See http://dflying.cnblogs.com/archive/2006/03/25/358547.html. We should set the correct update method to avoid unnecessary updates to the Panel, resulting in unnecessary performance/network overhead.
  4. NoOnlyUse updatepanel. If you create an atlas program from the beginning, using updatepanel alone to implement Ajax may not be the best choice. Updatepanel simply renders all the controls in the contenttemplate from the beginning, which may be very inefficient in some cases. For example, for updatepanel that contains a Treeview control with a considerable number of nodes, if you just want to add a new node, using updatepanel will retrieve the entire Treeview from the background and re-render it, it is far less efficient to store the node and add it to the Treeview. In these cases, you 'd better consider using some advanced Atlas client controls. Of course, this also increases the difficulty of development.
  5. InInitcompleteBefore an event is triggered, make sure that the updatepanelInitialized. That is to say, updatepanel cannot be placed in a headertemplate of a datalist, because the content in the headertemplate is obtained during the databinding period, and the initcomplete event on the page has already ended.
  6. Do not use response. Write () in updatepanel ();. This will disrupt the execution process of updatepanel.
  7. Atlas client scripts can be used on any development platform/Language. For example, ASP. NET 1.1, pure HTML or even PHP, but server-side controls such as updatepanel can only be used in ASP. NET 2.0 pages. The Atlas client script is actually some organized JavaScript files, of course it is irrelevant to the technology used on the server. However, when using a non-ASP. NET 2.0 Environment, you must manually add references to these JavaScript files because you cannot use the server-side control scriptmanager in ASP. NET 2.0.
  8. Be careful to include third-party Javascript in updatepanelImplemented Components. Developing a cross-platform JavaScript framework is a very difficult task, and there are still many compatibility issues in the current Atlas implementation. Let's look forward to a better future or simply try to solve it by ourselves.

At the same time, addUpdateprogressThe server-side control will let users know what your program is doing. Here are some tips for using the updateprogress control:

  1. Add one on the page and add only one updateprogressWidget. The updateprogress control should be a global control. All Ajax operations are automatically processed by the updateprogress control. Imagine that if Gmail suddenly shows many loading prompts, the user will be overwhelmed.
  2. In the updateprogress templateMagic ID:AbortbuttonYou can provide a server-side button or linkbutton control and specify the ID as abortbutton so that you can cancel the currently executed Ajax request. Of course, using magic ID is not a good design method. I believe that in future versions, this magic ID will be replaced by something similar to <canceltemplate>. Of course, in the current Atlas version, remember abortbutton.

From: http://dflying.cnblogs.com/archive/2006/04/01/363998.html

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.