设计ASP客户端 ASP的实现代码如下:
header.asp <@ LANGUAGE="VBSCRIPT" ENABLESESSIONSTATE = False %> <% ' 目的:表头包括用来启动所有页的文件 ' 还包括全局函数 Option Explicit Response.Buffer = True Response.Expires = 0 sub Doheader(strTitle) %> <html> <head> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312"> <title>Event Calendar - <%= strTitle %></title> </head> <body bgcolor="white" link="blue" alink="blue" vlink="blue"> <basefont face="Verdana, Arial"> <center><h1>Event Calendar</h1> <h3><%= strTitle %></h3> <% end sub function GetDataConnection() dim oConn, strConn Set oConn = Server.CreateObject("ADODB.Connection") strConn = "Provider=SQLOLEDB; Data Source=adspm; Initial Catalog=TeamWeb; " strConn = strConn && "User Id=TeamWeb; Password=x" oConn.Open strConn set GetDataConnection = oConn end function %> |