Ver Mensaje Individual
  #2 (permalink)  
Antiguo 14/12/2011, 19:30
Avatar de phillipecw
phillipecw
 
Fecha de Ingreso: septiembre-2008
Ubicación: Lima, Peru, Peru
Mensajes: 142
Antigüedad: 15 años, 7 meses
Puntos: 19
Respuesta: Como veo el Codigo Fuente de un fichero ASP?

Hola.

A ver si te sirve este código:

Código ASP:
Ver original
  1. <%
  2.   Dim getFileName
  3.   getFileName = "file.asp"
  4.  
  5.   Dim URL
  6.   URL = Server.MapPath(".") & "/" & getFileName
  7.  
  8.   Dim objXMLHTTP
  9.   Set objXMLHTTP = Server.CreateObject("Microsoft.XMLHTTP")
  10.   objXMLHTTP.Open "GET", URL, false
  11.   objXMLHTTP.Send
  12.  
  13.   Response.Write "<textarea name=""CodeView"" id=""CodeView"" rows=""20"">"
  14.   Response.Write objXMLHTTP.responseText
  15.   Response.Write "</textarea>"
  16.  
  17.   Set objXMLHTTP = Nothing
  18. %>

No es para descargar el archivo, sino para mostrar el código en un <textarea>.

Saludos.
__________________

Phillipe Calmet Williams
Freelance Front-End Developer, Graphic & Web Designer www.phillipecw.com