启动你的VB,选择ActiveX图标.这个图标可以在新建工程找到!VB会提供一个默认的工程名(project1)和类名(class1).我们会将这两个名字都改掉.在改名之前,请首先确认我们拥有Microsoft Active Server Pages Object Library,它在我们的程序非常有用.从菜单中选择"工程",然后在其中选择"引用",就会出现"引用"窗口
从中选择Microsoft Active Server Pages Object Library.
Public Sub OnStartPage(PassedScriptingContext As ScriptingContext)
Set MyScriptingContext = PassedScriptingContext
Set MyApplication = MyScriptingContext.Application
Set MyRequest = MyScriptingContext.Request
Set MyResponse = MyScriptingContext.Response
Set MyServer = MyScriptingContext.Server
Set MySession = MyScriptingContext.Session
End Sub
Private MyScriptingContext As ScriptingContext
Private MyApplication As Application
Private MyRequest As Request
Private MyResponse As Response
Private MyServer As Server
Private MySession As Session
Public Sub OnEndPage()
Set MyScriptingContext = Nothing
Set MyApplication = Nothing
Set MyRequest = Nothing
Set MyResponse = Nothing
Set MyServer = Nothing
Set MySession = Nothing
End Sub
Private MyScriptingContext As ScriptingContext
Private Request As Request
Private Response As Response
Private Server As Server
Private User_Id As Long
Private Menu_Id As Long
Private PageNow As Long
Public Sub OnStartPage(PassedScriptingContext As ScriptingContext)
Set MyScriptingContext = PassedScriptingContext
Set Request = MyScriptingContext.Request
Set Response = MyScriptingContext.Response
Set Server = MyScriptingContext.Server
'Response.Expires = 0
User_Id = CLng(Request.QueryString("UID"))
Menu_Id = CLng(Request.QueryString("MID"))
PageNow = CLng(Request.QueryString("PGN"))
'.........内容、处理
Response.Write "这里是你想输出的东西们"
End Sub
Public Sub OnEndPage()
Set MyScriptingContext = Nothing
Set Request = Nothing
Set Response = Nothing
Set Server = Nothing
End Sub