home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 9 / IOPROG_9.ISO / contrib / iis4 / iis4_07.cab / Components_VBScript.asp < prev    next >
Encoding:
Text File  |  1997-09-03  |  886 b   |  40 lines

  1. <%@ LANGUAGE = VBScript %>
  2. <%  Option Explicit        %>
  3.  
  4.  
  5. <HTML>
  6.     <HEAD>
  7.         <TITLE>Using Components</TITLE>
  8.     </HEAD>
  9.  
  10.     <BODY bgcolor="white" topmargin="10" leftmargin="10">
  11.  
  12.         
  13.         <!-- Display Header -->
  14.  
  15.         <font size="4" face="Arial, Helvetica">
  16.         <b>Using Components with ASP</b></font><br>
  17.       
  18.         <hr size="1" color="#000000">
  19.  
  20.         This sample demonstrates how to instantiate
  21.         and use components with ASP. The script will
  22.         use the Tools component that comes with IIS
  23.         to generate a random number.  Note that
  24.         server-side components exist only on the
  25.         server; only standard html is sent to the
  26.         client.<br><br>
  27.  
  28.  
  29.         <% 
  30.             Dim example
  31.         
  32.             ' Instantiate Component on the Server
  33.             Set example = Server.CreateObject("MSWC.Tools")
  34.         %>
  35.         
  36.         Random Number = <% = example.Random() %>
  37.  
  38.     </BODY>
  39. </HTML>
  40.