1、[美]G.Andrew Duthie ,《Microsoft ASP.NET程序设计 》,北京:清华大学出版社,2002
3、周之英,《现代软件工程》,北京:科学出版社,1999
4、 覃剑锋 张钢 ,《ASP网站建设专家》,机械工业出版社
5、 黄明,《ASP信息系统设计与开发实例》,机械工业出版社
[1] 冯昊. ASP动态网页设计与上机指导[M]北京:清华大学出版社,2002
[2] 杨冀川. ASP动态网站设计实战[M]北京:机械工业出版社,2000
[3] 沈大林. Dreamweaver Flash Fireworks三合一教程[M].北京:电子工业出版社,2001
[4] Mike Morrison , Jonline Morrison. 数据库的WEB站点[M] 北京:清华大学出版社,2002
[5] 杨威. ASP3.0网络开发技术[M].北京:人民邮电出版社,2001
[6] 余雷,周松建. ASP.NET应用开发百例[M] 北京:清华大学出版社,2003
[7] 李劲. 精通ASP数据库设计[M].北京:科学出版社,2001
[8] 黄斯伟,王玮. HTML4.0使用祥解[M].北京:人民邮电出版社,1999
[9] 白鉴聪,王进. JavaScript网页效果大师[M]. 北京:机械工业出版社,2001
[10] 武苍林,罗晃. Web数据库的ASP开发方案[J].计算机工程与科学,1999:21(1):65-68
[11] 贾军渭. 基于WWW和分布式对象技术的Browser/ Server结构[J].计算机工程.1998,10
[12] 陈世雄,耿新民等. 多层分布式B/S计算模式的Web数据库应用程序Delphi实现技术[Z].计算机工程.2001,10
[13] 侯云峰. Client/Serve应用开发指南[M]. 北京:电子工业出版社.2000
[14] 高传善,张世承. 计算机网络教程[M].上海:复旦大学出版社.1997
Active Server Pages (ASP) is Microsoft's first server-side script engine for dynamically-generated web pages. It was initially marketed as an add-on to Internet Information Services (IIS) via the Windows NT 4.0 Option Pack, but has been included as a free component of Windows Server since the initial release of Windows 2000 Server. Programming ASP websites is made easier by various built-in objects. Each object corresponds to a group of frequently-used functions useful for creating dynamic web pages. In ASP 2.0 there are six such built-in objects: Application, ASPError, Request, Response, Server, and Session. Session, for example, is a cookie-based session object that maintains variables from page to page. Web pages with the ".asp" or file extension use ASP, although some Web sites disguise their choice of scripting language for security purposes. The ".aspx" extension is not an ASP page, but an ASP.NET page, another server-side scripting language from Microsoft, based on a mixture of traditional ASP, and Microsoft's .NET technology.
Most ASP pages are written in VBScript, but any other Active Scripting engine can be selected instead by using the @Language directive or the <script language="language" runat="server"> syntax. JScript (Microsoft's implementation of ECMAScript) is the other language that is usually available. PerlScript (a derivative of Perl) and others are available as third-party installable Active Scripting engines.
History
ASP was one of the first web application development environments that integrated web application execution directly into the web server. This was done in order to achieve high performance compared to calling external executable programs or CGI scripts which was the most popular method for writing web applications at the time it was introduced. Today there are additional platforms for web application development that are more common on other operating systems. Both JavaServer Pages and PHP are more commonly found on webservers running non-Microsoft operating systems, with PHP currently being the more common of the two. Also of note is ColdFusion, a popular Java technology running on several platforms including Microsoft servers as well as other platforms.
Prior to Microsoft's release of ASP for IIS 3, programmers relied on IDC and HTX files combined with ODBC drivers to display and manipulate dynamic data and pages running on IIS. The basics of these file formats and structures were used, at least in part, in the implementation of the early versions of ASP.
InstantASP and ChilisoftASP are technologies that run ASP on platforms other than the Microsoft Windows Operating System. ChilisoftASP was purchased by Sun Microsystems and later renamed "Sun ONE Active Server Pages", then later renamed to "Sun Java System Active Server Pages". It appears that InstantASP is no longer available. There are large open source communities on the internet, such as ASPNuke, which produce ASP scripts, components and applications to be used free under certain license terms.
[edit] Versions
ASP has gone through three major releases:
ASP version 1.0 (distributed with IIS 3.0) in December 1996
ASP version 2.0 (distributed with IIS 4.0) in September 1997
ASP version 3.0 (distributed with IIS 5.0) in November 2000
ASP 3.0 is currently available in IIS 6.0 on Windows Server 2003 and IIS 7.0 on Windows Server 2008.
ASP.NET is often confused as the newest release of ASP, but the technologies are very different. ASP.Net relies on the .Net Framework and is a compiled language, whereas ASP is strictly an interpreted scripting language.
The move from ASP 2.0 to ASP 3.0 was a relatively modest one. One of the most important additions was the Server.Execute methods, as well as the ASPError object.[1] Microsoft's What's New in IIS 5.0 lists some additional changes.
There are solutions to run "Classic ASP" sites as standalone applications, such as ASPexplore, a software package that runs Microsoft Active Server Pages offline.
[edit] Sample usage
Several scripting languages may be used in ASP. However, the default scripting language (in classic ASP) is _VBScript:
<html>
<body>
<% Response.Write "Hello World! How are you today?" %>
</body>
</html>
Or in a simpler format
<html>
<body>
<%= "Hello World!" %>
</body>
</html>
The examples above print "Hello World!" into the body of an HTML document.
Here's how to connect to an Access Database
<%
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("DB.mdb")
Set rsUsers = Server.CreateObject("ADODB.Recordset")
rsUsers.Open "SELECT * FROM Users", oConn
%>
动态伺服器网页(Active Server Pages),由微软公司开发的服务器端运行的脚本平台,它被Windows下Internet Information Services (IIS)的程式所管理。透过ActiveX server 的技术让不同的使用者能有不同的画面,或需要让他们可以存取服务器 (server)上的资料时,使用ASP3.0中提供了五个内建的物件建立模拟和安全性的动态内容,来协助程序员隐藏复杂的沟通机制,让程序员可以专注在解决问题和应用之上,这样可以更快速地开发动态网页的同时每一个组件都是可以由一组富有经验的程序员根据动态网页最常用的功能而独立开发。
五个组件包括:
Application:在一个 ASP-based application 让不同使用者共享资讯。
Request:从使用者处理取得资讯
Response:将资讯送给使用者
Server:提供一些 Web Server 的工具
Session:储存在一个 session 内使用者的资讯
目录 [隐藏]
1 ASP 的特色
1.1 物件的支援
1.2 状态 (State) 的管理
2 版本
3 原理
4 范例
5 参见
6 外部链接
[编辑] ASP 的特色
ASP隐藏了网页伺服器与浏览者之间沟通的烦琐机制的同时也基於script base的特性,网页撰写员可以专心撰写应用的程式的逻辑部份,再者ASP也像 HTML 般透过选写程序来即时测试网页是否安全地运行,而不必担心程式和伺服器不能沟通的问题,另外因为那些 script 是於发送前於伺服器中先行转译处理成为HTML后再而发送至代理伺服器边的动态网页技术,不必担心浏览器的支援性及,网页撰写员的程式逻辑像 client-side script 会被盗用,因此最终浏览者只会是使用 HTML 来浏览。
利用ASP程序最常用的是Cookies,它利用Session组件实现的。同时还可以利用第三方组件延伸ASP的作用,如利用MailSender组件发送电子邮件。
通过ASP我们可以结合HTML网页、ASP指令和ActiveX元件建立动态、交互且高效的WEB服务器应用程序。同时,ASP也支持VBScript和JScript等脚本语言,默认为VBScript。其中JScript是微软公司的ECMAScript标准的实现,并且有自己的扩展。
[编辑] 物件的支援
ASP对 COM 的支援会允许撰写员使用 server component(或OLE Automation server)。透过它撰写员可以发展自已的物件,或将把程式转成 Web-base 的介面。
[编辑] 状态 (State) 的管理
状态管理是ASP的重要功能之一,原因为HTTP是一个stateless的协定,当有匿名的 request进入时,浏览者无法辨认这些的request 是否安全,或那些request 之间的关连性时,便无法透过浏览者取得资讯如帐户及密码等,对交易特性的 Web 应用程式造成了阻碍。因此ASP透过 cookie的包装和使用让浏览者可以简单地管理众多使用者名称的不同状态。
ASP 对的管理更是令人称赞,我们知道,HTTP 本身是一个 stateless 的协定,也就是说对於匿名的 request,你无法分辨这些 request 是属於谁的、或这些 request 之间的关连性,这对发展一个有交易特性的 Web 应用程式实在是个伤脑筋的问题。现在,ASP 透过 cookie 的包装和使用,让你可以简单的管理不同使用者的不同 state。
[编辑] 版本
ASP已经是.NET的成员之一,即ASP.NET 目前最新的版本是 ASP.NET 2.0
[编辑] 原理
ASP是经过服务器解析之后再向网页浏览器返回数据,所以有了ASP就不必担心客户的浏览器是否能运行你所编写的代码。因为所有的程序都将在网页服务器端执行,包括所有嵌在普通HTML中的脚本程序。当程序执行完毕后,服务器仅将执行的结果返回给客户浏览器,这样也就减轻了客户端浏览器的负担,大大提高了交互的速度。
由于代码是需要经过服务器执行之后才向浏览器发送的,所以在客户端看到的只能是经过解析之后的数据,而无法获得源代码,故编写者不用担心自己的源代码会被别人剽窃。但不排除黑客利用系统漏洞窃取服务器端的ASP源代码。
基于这样的解析方式,也导致运行ASP页面相对于普通的HTML页面要慢一点。因为普通的HTML页面只需要浏览器就能够解析,而ASP则必须是服务器将整页的代码都执行一遍之后再发送数据。
ASP提供与数据库的交互,如Microsoft SQL Server、Microsoft Access、MySQL和Oracle,比较流行的是ASP和Microsoft SQL Server的组合。
[编辑] 范例
ASP程序(包括与数据库连接的部分)都是嵌入在普通HTML和其他客户端语言中的。例如
你好!
<!--上面是将“你好!”在浏览器中输出,这是通过HTML实现的-->
<%
' 这一行注释,将不会显示
Response.write "Wikipedia!" ' 这行将在浏览器中输出“Wikipedia!”
%>
从中我们可以看出,ASP语言是嵌入在“<%...%>”之间的部分。而这个程序最终结果将是:
你好!Wikipedia!
在程序设计生涯混了10几年,最反感的就是形式主义,朋友,当你有扎实的编程技术,不要拘泥于形式,当然,你现在也是没有办法,现实是这样,建议你到学校图书馆,或者书店,自己去看看,程序这东西,并不是看书可以解决问题的,需要实战. 还有一点,不要认为asp落后了就不好好学,编程学的是一种思想,当你精通一门语言,其他语言,可能3-5天就可以学会了,好好努力吧.