Atlas updatepanel usage tips and FAQs

Source: Internet
Author: User
Http://dflying.dflying.net/1/archive/103_atlas_updatepanel_tips_and_faqs.html

Many developers willUpdatepanelControls are gradually exposed.Atlas.UpdatepanelIt is powerful and easy to use, and brings us closerAtlas.

I once published a pairUpdatepanel(Http://dflying.cnblogs.com/archive/2006/03/25/358547.html) And received a lot of feedback and questions. I think it is necessary to answer these questionsUpdatepanelInto a post. Hope to help. Here, I would like to thank you,DuduAnd all the friends who raised questions or participated in the discussion, let meUpdatepanelHave a deeper understanding.

First, the most important thing is to pay attentionAtlasHome:Http://atlas.asp.net/. We knowAtlasIs a new, under developmentFrameworkEvery month or even every weekAtlasDevelopers often pay attentionHttp://atlas.asp.net/Yes. You will get the latest news, the latest features, and the latest demo.Program. For beginners,Http://atlas.asp.net/docsProvidedAtlasOfAPI,ClassThis document can be used as a reference (not complete yet, please pay more attention ). There are someAtlasAndASP. NETPersonal websites of core characters/Blog, Also worth regular access (English ):

    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/

Atlas updatepanelTips for using server controls:

  1. Be sure to setScriptmanagerEnablepartialrenderingThe property isTrue. Many people complained to me about theirUpdatepanelNotAjaxWork in a way that triggers a normal whole pagePostBackThe reason is that this attribute is not set.
  2. Set triggerUpdatepanelIs a server control.. Because regardlessControlvaluetriggerOrControleventtrigger, The specified attribute/Events are server-side attributes./Events can only be triggered when the server property changes or the server sends an event.UpdatepanelOfPostBack.
  3. Differences updatepanel two update Methods : always and conditional . See http://dflying.cnblogs.com/archive/2006/03/25/358547.html . We should set the correct update method to avoid unnecessary update panel , this causes unnecessary performance / network overhead.
  4. do not only Use updatepanel . If you create a Atlas program from the beginning, using updatepanel to implement Ajax may not be the best choice.. updatepanel simply render all objects in contenttemplate control, in some cases, it may be very inefficient, for example, for a Treeview updatepanel , if you just want to add a new node, updatepanel is used to obtain the entire data from the background Treeview and re-render the data., it is far less efficient to store the node and add it to 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 thatUpdatepanelInitialized. That is to sayUpdatepanelFor exampleDatalistOfHeadertemplateBecauseHeadertemplateThe content inDatabindingAnd then the pageInitcompleteThe event has already ended.
  6. Do not use response. Write () in updatepanel ();. This will disrupt the execution process of updatepanel.
  7. AtlasClient scripts can be used on any development platform./Language. For exampleASP. Network 1.1, PureHtmlEvenPHP, But likeUpdatepanelSuch server-side controls can only be usedASP. Network 2.0Page.AtlasClient scripts are actually organizedJavascriptFiles, of course, are not related to the technology used on the server. But when you useASP. Network 2.0Environment, You need to manually addJavascriptFile Reference, because you cannot useASP. Network 2.0Server-side controls inScriptmanager.
  8. Be careful whenUpdatepanelContains third-partyJavascriptImplemented Components. Develop cross-platformJavascript frameworkIs a very difficult task, in the currentAtlasThere are still many compatibility issues in implementation. Let's look forward to a better future or simply try to solve it by ourselves.

at the same time, add a updateprogress server-side control to show you what your program is doing.. Here are some tips for using updateprogress controls:

    1. Add one on the page and add only one updateprogress control . updateprogress the control is a global control, all Ajax operations are automatically processed by the updateprogress control.. Imagine if Gmail displays multiple loading prompts, users will be overwhelmed.
    2. in updateprogress template magic id : abortbutton , you can provide a server button or linkbutton Control and specify id is abortbutton , this allows you to cancel the currently executed Ajax request. Of course, using magic id is not a good design method, we believe that in future versions, this magic id will be a similar . Of course, in the current Atlas version, remember abortbutton .

If any error occurs, please do not confirm. You are also welcome to leave a message to discuss related issues.

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.