Notes for using ASP. NET Ajax

Source: Internet
Author: User
1. screen migration should use the response that executes screen redirection. redirect instead of server. transfer, because server. transfer does not change the IE client URL, which causes ASP. a URL error occurs when the. NET Ajax client script accesses the resource.

2. the scriptmanager class should be used to register scripts and hidden fields on the server, instead of pages. clientscript object, because page. the clientscript method registers the script to a global object, causing local update. These scripts are not sent to the client, but the scriptmanager method is the opposite. The scriptmanager class can be used no matter whether there is a scriptmanager control on the screen.

3. put both the event source control and the control to be updated to updatepanel. If only the updated control is placed in updatepanel, the event source control triggers a refresh screen when it is outside the updatepanel.

4. Add the hidden fields and controls involved in the update to updatepanel. If the hidden field is not placed in updatepanel, its value cannot be modified during update. Similarly, the hidden control to be operated cannot be operated in updatepanel.

5. the ASP. NET Ajax script method should be executed after the scriptmanager label, because the place where the scriptmanager is placed is where the ASP. NET Ajax script library is embedded, which means that the previousCodeIs unable to access the script library method.

6. Handle SYS. webforms exceptions because these exceptions may lead to errors that are hard to understand and should be blocked when necessary.

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.