PRivate objRequest as Request Private objResponse as Response Private objServer as Server Private objsession as Session Private objapplication as Application
Public Sub onstartpage(sc As ScriptingContext) ' 创建 asp 对象,这样下面的 objRequest...就可以和在 vb 中一样简单了 Set objRequest = sc.Request Set objResponse = sc.Response Set objServer = sc.Server Set objSession = sc.Session Set objApplication = sc.application End Sub
Public Sub WriteCopyright() objResponse.Write "豆腐制作,都是精品<br>" objResponse.Write "<a href=http://www.asp888.net>豆腐技术站</a>" End Sub 然后生成这个组件,给他起个工程名字 testCom,在 asp 中做如下调用 <html>
<% Set testCom = createObject("testCom.testWrite") testCom.WriteCopyright %>