Here first is the source file and below it the include file, classes.inc. An include file can consist of any combination of client-side script, server-side script and HTML as long as it is syntactically correct and is consistent with the script or HTML source at the point in the ASP page where it is inserted. The include file provides the opportunity to build libraries of re-useable code

<% Option Explicit %>
<HTML>
<HEAD>
<TITLE>Including a Library File</TITLE>
<!-- #include File="Classes.inc" -->
</HEAD>
<BODY>

<H2>Welcome</H2>

Here is information about the server: <P>
<%
Dim oServer
Set oServer = New CServer
%>

Name: <%= oServer.Name %> <BR>
Server Software: <%= oServer.Software %> <BR>
Port: <%= oServer.Port %> <BR>
Protocol: <%= oServer.Protocol %> <BR>
Current Page: <%= oServer.URL %> <BR>

</BODY>

</HTML>

<SCRIPT RUNAT="Server" LANGUAGE="VBScript">
Class CServer
Private sName, sProtocol, sSoftware, sURL, IPort

Public Property Get Name()
  Name = sName
End Property

Public Property Get Port()
  Port = IPort
End Property

Public Property Get Protocol()
  Protocol = sProtocol
End Property

Public Property Get URL()
  URL = sURL
End Property

Public Property Get Software
  Software = sSoftware
End Property

Private Sub Class_Initialize()
  sName = Request.ServerVariables("SERVER_NAME")
  IPort = Request.ServerVariables("SERvER_PORT")
  sProtocol = Request.ServerVariables("SERVER_PROTOCOL")
  sSoftware = Request.ServerVariables("SERVER_SOFTWARE")
  sURL = Request.ServerVariables("URL")
  sSoftware = Request.ServerVariables ("SERVER_SOFTWARE")
End Sub
End Class
</SCRIPT>