Hello World ASP Scripts

The following code is the global.asa file for the Hello World mini-sample:

<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Sub Application_OnStart
   Application("Connection_String") = "DSN=HelloWorld"
End Sub
</SCRIPT>

The following code is the default.asp file for the Hello World mini-sample:

<%@ Language=VBScript  EnableSessionState=False%>
<% Option Explicit%>
<% 'Copyright Microsoft Corp. 1998-1999 %>
<HTML>
<HEAD>
<TITLE>Hello World Mini Sample</TITLE>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>

<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<h2> HELLO WORLD MINI SAMPLE </h2>

<h3>Hello World FROM HTML</h3>

<script language="JavaScript">
   document.write('Hello World FROM JAVASCRIPT');
</script>

<% Dim objHello,strLang

   Response.Write "<p><b>" & "Hello world FROM ASP to " & _
                  Request.ServerVariables("REMOTE_HOST") & _
                  "</b><br>" & vbCrLf
   
   Set objHello = Server.CreateObject("Hello.CHelloWorld")
      
   If objHello Is Nothing Then
      Response.Write "Unable to instantiate Hello object. Is it registered?"
   Else 
      strLang = Request.ServerVariables("HTTP_ACCEPT_LANGUAGE")
      objHello.ConnectionString = Application("Connection_String")
      objHello.SayHello(strLang)
      Set objHello = Nothing
   End if
%>

</BODY>
</HTML>