home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 February / CHIP_2_98.iso / software / pelne / optionp / iis4_06.cab / samp7roz.asp < prev    next >
Text File  |  1997-10-23  |  3KB  |  42 lines

  1.  <% If Request("DontFrame")<>1 Then Response.Redirect "/iissamples/sdk/asp/docs/SampFram.asp?ovfile=/iishelp/iis/htm/sdk/samp7roz.asp&srcfile=Components/Tools" %>
  2. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
  3. <HTML>
  4. <HEAD>
  5. <META HTTP-EQUIV="Content-Type" Content="text-html; charset=Windows-1252">
  6. <title>Tools</title>
  7. <script language="JavaScript">
  8.  
  9.     szNavVersion = navigator.appVersion
  10.  
  11.     if (navigator.appName == "Microsoft Internet Explorer") {
  12.     if (szNavVersion.indexOf ("4.") >= 0) {
  13.         document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/spidie4.css">');
  14.     } else {
  15.         document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/spidie3.css">');
  16.     }
  17.     }
  18.     else if (navigator.appName == "Netscape") {
  19.     document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/spidie4.css">');
  20.     }
  21.     else {
  22.     document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/spidie3.css">');
  23.     }
  24.  
  25. </script>
  26. <META NAME="DESCRIPTION" CONTENT="Internet Information Server reference information"></HEAD>
  27. <BODY BGCOLOR=#FFFFFF TEXT=#000000>
  28. <font face="Verdana, Arial, Helvetica">
  29. <h3><a name="_tools"></a>Tools</h3>
  30. <p>
  31. The Tools component creates a <b>Tools</b> object that provides utilities that enable you to easily add sophisticated functionality to your Web pages, including advanced form processing, random number generating, and file existence testing.</p>
  32. <p>
  33. This example demonstrates several of the capabilities of the <b>Tools </b>object. This script first uses the <b>FileExists</b> method provided by the <b>Tools</b> object, which can be used to ascertain whether a given file exists or not. The example calls this method using one invalid file name and one valid file name (the file name of the script itself).</p>
  34. <p>
  35. The <b>Random </b>method of the <b>Tools</b> object is shown in the second half the script. <b>Random</b>, when called, returns a random value between -32767 and +32767. This sample demonstrates several ways in which the output can be made even more useful, using the <b>Abs</b> function to allow only positive numbers, or using the <b>Mod</b> operator to generate numbers between 1 and 100.</p>
  36. <p>
  37. <b>Note</b>  This component is not installed with IIS. You can install it from the CD included with the IIS Resource Kit. The ProgID declared by the component version installed from this source specifies "IISSamples" in the vendor component of the ProgID, not "MSWC." Therefore, the <b>Server.CreateObject</b> invocation in this sample script must be modified to reflect the proper component ProgID.</p>
  38. <hr class="iis" size="1">
  39. <p align="center"><em><a href="/iishelp/common/colegal.htm">© 1997 by Microsoft Corporation. All rights reserved.</a></em></p>
  40. </BODY>
  41. </HTML>
  42.