Notes when writing ASP

Source: Internet
Author: User

Basic Requirements

● The program on the local backup server on the working machine should be backed up every morning or when a large-scale program change is required

● Unless in special cases, all file directory names must be in combination with lowercase letters, numbers, and underscores (_).

Contains Chinese characters and spaces or special characters except the file name. The extension names of HTML files containing only one dot can be the default files in the HTML Directory: Default. asp and default.htm.

● Super connections between webpages should generally be relative URLs

● The recommended HTML structure is

<! Doctype HTML public "-// W3C // dtd html 4.0 transitional // en">
<HTML>
<Head>
<Title> new document </title>
<Meta name = "generator" content = "editplus">
<Meta name = "author" content = "">
<Meta name = "keywords" content = "">
<Meta name = "Description" content = "">
</Head>
<Body>
</Body>
</Html>

● To ensure compatibility with the latest web standards, double quotation marks should be used for all attributes in HTML tags.

● Set the character set of all pages containing Chinese characters to gb2312 in the <Meta http-equiv = "Content-Type" content = "text/html"; charset = "gb2312">
● You should not see more than one consecutive & nbsp in the source code; you should use full-angle spaces at the table layer for formatting.

● The font size should be set to a Cascading Style Sheet, except for text titles. <font>

● The program should start with the following version information:

<%
'Copyright (c) 2000 Liao yongnan all copyright reserved
'Version 0.01.0001
'Orginal Author: Lyn
'Last update:
'Modified:
'Modifiecation Date:
%>

● Clearer constant code

● Variable names should be clearly defined as ambiguous variable names that cannot be greedy and effort-consuming

● Do not use <% @ Language = VBScript %>

● Do not use include files to reduce script Performance

● STR = STR &... repeated variable space allocation will reduce script Performance

● If a value in a set is read more than once like request. From ("userid") Rs. Field (0), it should be assigned to a local variable and then directly read the variable.

● In the SELECT statement, fields are returned and referenced by numbers instead of field names.

● Improve dataset access. Use getstring (not flexible enough) to flexibly and efficiently getrows

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.