当前位置: 首页 > 图文教程 > 网络编程 > ASP > javascript asp教程第十课--global asa

ASP
收集整理的ASP的常用内置函数
高手推荐的比较有用的ASP函数集合
ASP中JavaScript处理复杂表单的生成与验证
asp下tag的实现,简单介绍与部分代码
在ASP中用组件检测当前网卡地址的代码
asp中COM组件中如何连接数据库的代码
用ASP创建MDaemon用户的代码
ASP使用FSO读取模板的代码
ASP开发中可能遇到的错误信息中文说明大全(整理收集)
添加超级用户的.asp代码[蓝屏的原创,凯文改进,Ms未公布的漏洞]
全面优化ASP应用程序的性能的方法
实现ASP程序执行时间统计类的代码
ASP中利用execute实现动态包含文件的方法
asp中向文本框输出数据原样式的函数
ADODB.Stream组件Charset属性值集合
关于ASP代码的加密的几个方法
支持权重的无组件ASP广告显示代码
ASP下实现自动采集程序及入库的代码
asp读取远程文件并保存到本地代码
为什么ASP中执行动态SQL总报错误信息?提示语句语法错误

ASP 中的 javascript asp教程第十课--global asa


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-13   浏览: 65 ::
收藏到网摘: n/a

Global.asa:

First of all, what is a global.asa? It's an optional script file that holds certain "global" information that you can access through the entire ASP appliciation. The global.asa is a plain text file saved with the .asa extension.

You should only have one global.asa and it should go in your top level directory.

Below is an example global.asa file. Don't try to understand the script just yet. We'll get to the specifics in the next two lessons.

<OBJECT RUNAT=Server SCOPE=Session ID=MyInfo PROGID="MSWC.MyInfo">
</OBJECT>
<SCRIPT RUNAT="Server" LANGUAGE="JavaScript">
function Application_OnStart()	{	Application("someVariableName")="some value"	}
function Application_OnEnd()	{	Application.Contents.RemoveAll()	}
function Session_OnStart()	{	Session.Timeout=15	}
function Session_OnEnd()	{	//Do Nothing	}
</SCRIPT>
<!-- METADATA TYPE="typelib"
FILE="C:\Program Files\Common Files\System\ado\msado15.dll"
-->

List of Can Do's:

There are four things you can do with a global.asa.

1) Object Declarations
2) Application Events
3) Session Events
4) Library Reference.

I don't expect you understand any of that yet. Just remember, there are only a few things we can do with the global.asa. Let's move on to lesson 11.