asp的语法就是VBScript的语法吗?

cppsun 2010-09-25 10:37:10
asp的语法就是VBScript的语法吗?
...全文
104 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
ChinaXtHuLang 2010-09-28
  • 打赏
  • 举报
回复
[Quote=引用 8 楼 theforever 的回复:]

在ASP里,你是可以使用JSCRIPT的。但这不意味着它和JSP有什么关系,或者是不是很相像。它和JAVASCRIPT也是两回事。
ASP的程序几乎99%是用VBSCRIPT写的,就算是JSCRIPT,刚才也说了,和JSP无关,所以,一般经常把ASP,PHP,JSP等并列来说。
[/Quote]
YES
  • 打赏
  • 举报
回复
在ASP里,你是可以使用JSCRIPT的。但这不意味着它和JSP有什么关系,或者是不是很相像。它和JAVASCRIPT也是两回事。
ASP的程序几乎99%是用VBSCRIPT写的,就算是JSCRIPT,刚才也说了,和JSP无关,所以,一般经常把ASP,PHP,JSP等并列来说。
MiSenIn 2010-09-26
  • 打赏
  • 举报
回复
差不多是, 有些是服务器段的对象 VBSCRIPT无法执行 比如server.urlencode()
Dogfish 2010-09-25
  • 打赏
  • 举报
回复
可以是jscript,
看你使用那种的语言去表达.
ACMAIN_CHM 2010-09-25
  • 打赏
  • 举报
回复
自己看一下微软的相关文档吧。
ACMAIN_CHM 2010-09-25
  • 打赏
  • 举报
回复
ASP Overview
IIS 6.0
You can use Microsoft Active Server Pages (ASP) to create dynamic and interactive Web pages. An ASP page is a Hypertext Markup Language (HTML) page that contains script commands that are processed by the Web server before being sent to the client's browser. This explains how the term "server-side script" originated.

HTML Compared to ASP
--------------------------------------------------------------------------------

HTML is the simplest language for writing Web pages, but it allows you to create only static Web pages. When a Web client requests a static HTML file from a Web server, the Web server sends the HTML file directly to the client without any computation being done. The client's browser then processes the HTML code in the file and displays the content.

The following illustration shows the transmission of a static file where the displayed date will never change.



VBScript is the simplest language for writing ASP pages. All the code samples in the Creating ASP Pages section are written in VBScript except for samples that are duplicated in JScript for comparison. When a Web client requests an ASP file from a Web server, the Web server sends the ASP file through its ASP engine, where all the server-side script code is executed or converted into HTML code. The converted code is then sent to the Web client.

The following illustration shows the transmission of dynamically generated content where the displayed date reflects the date at the time of the request.


If you are an HTML author, you will find that server-side scripts written in ASP are an easy way to begin creating more complex, real-world Web applications. If you have ever wanted to store HTML form information in a database, personalize Web sites according to visitor preferences, or use different HTML features based on the browser, you will find that ASP provides a compelling solution. For example, previously, to process user input on the Web server you would have had to learn a language such as Perl or C to build a conventional Common Gateway Interface (CGI) application. With ASP, however, you can collect HTML form information and pass it to a database using simple server-side scripts embedded directly in your HTML documents. If you are already familiar with scripting languages such as VBScript or JScript (JScript is the Microsoft implementation of the ECMA 262 language specification), you will have little trouble learning ASP.

ASP Processing
--------------------------------------------------------------------------------

An ASP page is requested the same way that an HTML page is requested. A request can optionally contain a querystring after a question mark (?), using the following syntax:

Copyhttp://Server_name/MyASPFile.asp?var1=12&var2=Brown


When the server receives a request for an ASP file, it processes server-side script code contained in the file to build the HTML Web page that is sent to the browser. In addition to server-side script code, ASP files can contain HTML (including related client-side scripts) as well as calls to COM components that perform a variety of tasks, such as connecting to a database or processing business logic.

IIS processes an ASP file in the following order when a request is received from a client:
1.If an ISAPI filter is installed on the Web site, the ISAPI filters is processed first. This is true for all applications.

2.If the ASP application contains a Global.asa file in the root directory, the Global.asa is processed. Global.asa files specify event scripts and declare objects that have session or application scope. They donot display content; instead they stores event information and objects used globally by the ASP application.

3.In the requested ASP file, IIS separates the script blocks from the static HTML code blocks, reserving the static code in the response body.

4.IIS processes the script blocks. The script blocks might include transaction processing, database access calls, or calls to COM components in which case COM+ handles some of the processing.

5.After the ASP page script blocks are processed, their output is injected into the response body with the static HTML code.

6.The response is sent to the client.

Caution:
If you mix <SCRIPT> blocks with ASP code blocks (<% ... %>), the page might not execute in the order that you expect.


ASP and COM Components
--------------------------------------------------------------------------------

With ASP, you can combine HTML pages, script commands, and COM components to create interactive Web pages or powerful Web-based applications, which are easy to develop and modify.

COM components dramatically extend the power of ASP. COM components are pieces of compiled code that can be called from ASP pages. COM components are secure, compact, and reusable objects that are compiled as DLLs. They can be written in Visual C++, Visual Basic, or other languages that support COM.
ACMAIN_CHM 2010-09-25
  • 打赏
  • 举报
回复
[Quote]<%%>中间这些都是VBScript写的吗?[/Quote]
对!
cppsun 2010-09-25
  • 打赏
  • 举报
回复
<%%>中间这些都是VBScript写的吗?
ACMAIN_CHM 2010-09-25
  • 打赏
  • 举报
回复
不是,ASP 只是个对象模型。 active server page。 它可以支持多种语言。比如 Jscript , 另外安装插件后还可以支持PHP, PERL。
不过90%的情况下,ASP的程序都是用VBScript写的。

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧