home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 9 / IOPROG_9.ISO / contrib / iis4 / iis4_07.cab / Code.asp < prev    next >
Encoding:
Text File  |  1997-09-08  |  1.7 KB  |  60 lines

  1. <%
  2. Source=Request.QueryString("Source")
  3. %>
  4.  
  5. <HTML>
  6. <HEAD>
  7. <META NAME="DESCRIPTION" Content="FRAMESET Page for displaying sample ASP source code and output">
  8. <META NAME="GENERATOR" CONTENT="Microsoft Visual InterDev 1.0">
  9. <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso8859-1">
  10. <TITLE><%=Source%></TITLE>
  11. </HEAD>
  12.  
  13. <%If FileExists(Source) Then %>
  14.   <FRAMESET SCROLLING="YES" ROWS="*">
  15.     <FRAME SRC="CodeBrws.asp?source=<%=Source %>" NAME="CodeSource">
  16.   </FRAMESET>
  17.  
  18.   <BODY  BGCOLOR=#FFFFFF TOPMARGIN=0 LEFTMARGIN=0 ALINK=#23238E VLINK=#808080 LINK=#FFCC00>
  19.   <BASEFONT FACE="VERDANA, ARIAL, HELVETICA" SIZE=2>
  20.  
  21.   <!--Change link color on mouseover
  22.     Only if running Internet Explorer 4.0 or later -->
  23.   <!--#include virtual=IISSamples/ExAir/libHighlight.inc-->
  24.  
  25.   </BODY>
  26.  
  27. <%Else%>
  28.  
  29.   <BODY BGCOLOR=#FFFF9B TOPMARGIN=0 LEFTMARGIN=0 ALINK=#23238E VLINK=#228B22 LINK=#23238E>
  30.   <BASEFONT FACE="VERDANA, ARIAL, HELVETICA" SIZE=2>
  31.  
  32.   <% If Session("IEVersion") >= 4 Then %>
  33.   <!--Change link color on mouseover
  34.     Only if running Internet Explorer 4.0 or later -->
  35.   <!--#include virtual=ExAir/libHighlight.inc-->
  36.   <% End If %>
  37.  
  38.   <CENTER><H1>The source code for this page could not be found.</H1>
  39.   </CENTER>
  40.   </BODY>
  41.  
  42. <%End If%>
  43.  
  44. </HTML>
  45.  
  46. <%
  47.   ' Function to determine if a file exists
  48.   Function FileExists(Source)
  49.     On Error Resume Next
  50.     
  51.     strFilename = Server.MapPath(Source)
  52.     Set FileObject = Server.CreateObject("Scripting.FileSystemObject")
  53.     
  54.     FileExists = False
  55.     
  56.     ' Attempt to open the file
  57.     Set oTempStream = FileObject.OpenTextFile(strFilename, 1, FALSE, TRUE )
  58.     If Err = 0 Then FileExists = True
  59.   End Function
  60. %>