1、 英文资料翻译 系 别 软件与服务外包学院 专 业 软件技术 班 级 0904 姓 名 李 欣 学 号 100090590 指导教师 高振栋 2012 年 4 月 1 ASP Language Basics Active Server Pages (ASP) is a proven, well-established technology for building dynamic Web applications, which provides the power and flexibility you need to create anything from a personal, Web
2、based photo gallery to a complete catalogue and shopping cart system for your next eCommerce project. One unique feature of ASP is that it lets you choose your favourite scripting language, be it JavaScript or VBScript; however, VBScript is by far the most popular choice. In this article, Ill bring
3、you up to speed on the basic syntax of the VBScript language, including variables, operators, and control structures. This article is the second in a series teaching ASP. Specifically, the goal of this series is to teach you all you need to know to create dynamic Web sites using ASP. This article pi
4、cks up right where the previous article in the series, Getting Started with ASP, left off. Variables Here is the listing for the first ASP script I helped you create in the previous article: 1 2 3 My First ASP Page 4 5 6 % 7 Write out a simple HTML paragraph 8 Response.Write This is a test of ASP. 9
5、 % 10 11 As I admitted in that article, this is a pretty uninteresting example of an ASP script. When it comes right down to it, this script doesnt do anything a plain, old 2 HTML page couldnt do. Oh sure, I gave a slightly more interesting example that displayed the current server time, but to be r
6、eally useful a script needs to perform some form of calculation, or manipulate dynamic information to present it in some interesting way. The language used for writing most ASP programs, and which Ill be using throughout this series, is called VBScript. Like most programming languages, VBScript lets
7、 you store data in variables. A variable may be thought of simply as a named location in memory where data may be stored. VBScript is what is known as a loosely typed language, which means that a particular variable may store any kind of information, be it a number, a piece of text, a date, or some
8、more complicated chunk of data (as opposed to strictly typed languages where you can only store one kind of information in each variable). Before you can use a variable, though, you must declare it; that is, you must let ASP know that you want to create a variable with a particular name. Lets look a
9、t a basic example to help solidify these concepts in your mind. Say you were writing a Web page that performed conversions between Celsius and Fahrenheit temperatures. In countries where Celsius is used, 20°;C is commonly accepted as the value for room temperature. The following code creates a va
10、riable called intRoomTempC, and then assigns it a value of 20: New Revised 2nd Edition Out NOW! Build Your Own Database Driven Website Using PHP & MySQL Fully updated for PHP 4.3. Installation instructions for Mac OS X Full index provided New wider book size Enhanced fonts New cover design Lay-flat spine All content revisited Download the First 4 Chapters FREE