CodeAve.com CodeAve.com - ASP - Read/Write
ASP
·Read/Write
·Script Writers
·Database Display
·Response Objects
·Server Variables
·Random Events
·Articles
·Miscellaneous
·Contents
·What's New?
JavaScript
CSS
HTML
Maps
Links
Mail List
Search
Sitemap


 


View the Source of an .asp Document
Viewing the source of an asp document from a web browser allows only for the viewing of the output html text. Any text written in between <% %> is not outputted to the browser unless a write command is inserted. This is good for security, but bad for developers who made need to look at the code and do not have a local copy. The following script will read any text file (.asp, .html, .inc are all examples) and output it to the browser by changing the page_to_read value to a document relative to the position of the .asp code your using to read it (Example to read the index.asp document in the parent directory it should read page_to_read="../index.asp")
View the Output
Text View
Print View
Mail this Link
Download the Code

<%
' Target page to be read
page_to_read="view_source.asp"

' Create a server object
set fso = createobject("scripting.filesystemobject")

' Set the path to document to be read
set act = fso.opentextfile(server.mappath(page_to_read))

' Read the contents of the document to the
' read_text variable

read_text = act.readall

' Close the server object
act.close

' Write the inputted text out to the browser
' and html encode it to display as source
' enclosed in <pre> tags to display as read
response.write "<pre>" & server.htmlencode(read_text) & "</pre>"
%>

 

 

 



ASP: What's New? | Articles | Script Writers | Database Display | Read/Write
Server Variables | Response Objects | Random Events | Miscellaneous
HTML: Forms | Hyperlinks | Headers | Tables | Hyperlinks | Headers | Text Display
JavaScript: Document Info | Forms | Images | Navigation | Script Writers
CSS: Basics | Page Display | Text Display | Script Writers | Miscellaneous
  • 2014 michael kors
  • air max women 2013
  • 2014 michael kors
  • air max 2014
  • oakley glasses
  • oakley glasses

  • Maps: Map Script Writers | Bing Maps | Google Maps
  • bottes fr
  • ugg boot
  • Privacy Statement

    CodeAve.com is hosted by MyHosting.com
    Donate Food Online with a Mouse Click at TheHungerSite.com
    Donate Land Online with a Mouse Click at TheRainForestSite.com
    © 1999 - 2017 CodeAve.com
    All Rights Reserved

  • Kids jordan 6 rings
  • Jordan retro 10
  • Jordan retro 3