4.asp script foundation

xiaoxiao2021-03-06  40

Through the first two studies, I believe that you have designed a basic concept and overall impression of the dynamic website design of ASP. From this article, the author will start from the scripting language, lead everyone to explore the true mystery of ASP dynamic website design.

After the second article of this article, many friends have sent me "sisters". I hope to see the third, fourth, or even ... articles in this article as soon as possible, and even have an anxious thing to be anxious to be ASP. Send him. Seeing friends with such a symptom, making me spirit. Although ASP has been launched two years ago, until this year, it took advantage of its flexible and convenient development process, good Web database connection function received a national person, but due to the current domestic still lacking on ASP development web applications. Detailed textbooks, thus make the domestic major web developers are still at the stage of closing E text, as well as author himself. Because of this, the author will send the idea of ​​writing the article. After receiving the strong support of Mr. Weng Bin, the CHINABYTE Network Academy, you can see this article.

The author I can adopt this article to provide convenience to the majority of web developers and enthusiasts, so that everyone will come together to participate in the ASP's learning and communication. In order to take care of the needs of different level readers or decided to start from the most basic scripting language, then Step step by step, an ASP built-in object, ActiveX component, and instance of developing web applications with ASP. I believe that through a period of continuous learning, it is not possible to develop its own dynamic sites in a few months. Let's first ask me to learn about the basics of application scripting languages ​​(mainly VBScript) in ASP.

Before you start learning a scripting language, you should understand some simple concepts - variables, processes. The so-called variable is a named storage location in the computer memory, which contains data such as numbers or strings, which allows users to understand the name of script operations, providing users with a way to store, retrieve, and operation data. The program is composed of one or more processes. In VBScript, the process is "instruction block", and the process in which the process is generally, such as Sub, just for simple data processing.

In VBScript, strict speaking variables do not have to be declared.

Such as: <% mystring = "this is my string"%>

However, even if you don't need to declare the variables before using the variable, it should also be developed in a good habit of declaring variables during programming, as this helps prevent errors. Declaring a variable means telling the script engine, there is a variable of a specific name so that the variable can be referenced in the script. Declaring a variable in VBScript You can use the "DIM" statement, as follows: