ASP. NET2.0: Pay attention to the CSS and js files linked to pages with Chinese characters

Source: Internet
Author: User

When the defined style contains Chinese characters, such. sometyle {font-family: @ ;}. If the writing is incorrect, as shown in. sometyle {font-family: ;}, this should be an incorrect way of writing. In this way, not only does this style not work, but also affects the style behind it, I don't know whether the parsing of css is the rule or ASP. NET 2.0 problems.

When you directly add the js file downloaded from the Internet to the VS2005 project, if the file contains Chinese characters, when you call the method, A js error cannot be found for the object, just as if you didn't chain it like this file. You need to create a new js file in the project, copy the code in your down file into the new file, and then use the new file. This problem should be about file encoding.

In addition, ASP. NET2.0 adopts the XHTML 1.0 standard, whereas 1.x is HTML 4.0. We can see from the HTML source file headers of both.

<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<! Doctype html public "-// W3C // dtd html 4.0 Transitional // EN">

Therefore, the defined elements must comply with the XHTML 1.0 specification. For example, the length must be added to the Unit, for example, width: 100px; width: 100 does not work.

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.