Causing Ajax failure

Source: Internet
Author: User
Today, encountered a very XX problem, depressed to death ....

I wanted to add an updatepanel in the project today and refresh it in some places. I thought it was very simple to get it. The previous demo can be implemented... However, moving to the project won't work...

It turned out to be <xhtmlconformance mode = "Legacy"/>.

Summary:

See http://www.microsoft.com/china/msdn/library/webservices/asp.net/ASPNETusStan.mspx
To meet everyone's requirements, Microsoft has created a new configuration option named xhtmlconformance. You can set this option in the configuration file of the web site. The new configuration options enable you to specify the XHTML consistency level for Web pages. Its content is as follows.

<Configuration>
<System. Web>
<Xhtmlconformance
Mode = "Transitional"/>
</System. Web>
</Configuration>

By default, xhtmlconformance is set to transitional. However, you can set this option to strict or legacy.

If you set the xhtmlconformance option to strict The standard ASP. Net Control will no longer render certain attributes. For example, the ASP. NET <form> control no longer presents the name attribute. Unless the ASP. NET page contains (non-compliant) client scripts, no changes are noticed when switching from transitional mode to strict mode.

If you set the xhtmlconformance option to legacy The ASP. NET Framework restores some elements and attributes (but not all) to ASP. NET 1.1. In this case, the ASP. NET Framework will present content that is not compatible with any XHTML standard and the page will no longer pass the XHTML standard verification. For example, in legacy mode, when a <br> tag is displayed, the expected XHTML end slash (<br/>) is not displayed ).

Only when you apply existing ASP. NET 1.1ProgramIt makes sense to set xhtmlconformance to legacy mode when you encounter problems during migration to ASP. NET 2.0.

/Files/kingjiong/testajax.rar

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.