Reading another ASP page

Results 1 to 2 of 2

Thread: Reading another ASP page

  1. #1
    Join Date
    Dec 1969

    Default Reading another ASP page

    Hello all!<BR><BR>i´ve been trying to make an asp page read (like include) another one, but it´s not working.<BR>the second asp file that i want to "include" has only 2 or 3 If-EndIf, but i really need that this "asp codes" to be processed.<BR><BR>here is the ideia and my last try:<BR><BR>&#060;% ContentFile = Request.ServerVariables("URL")<BR> ContentFile = Replace(ContentFile, ".asp", "-article.asp")<BR> Set ObjFSO2 = Server.CreateObject("Scripting.FileSystemObject")< BR> Set ObjOPF2 = ObjFSO2.GetFile("ContentFile") <BR> Set ShowFile = ObjOPF2.OpenAsTextStream(ForReading) %&#062;<BR><BR><BR>please, someone help me<BR><BR>Thanks a lot and i´m sorry for any mistakes with my english.<BR><BR>[]´s<BR>Portnoy

  2. #2
    Join Date
    Dec 1969

    Default Can't do it that way...

    Why you open a text file, the *ONLY* thing you can get is text.<BR><BR>You can&#039;t EXECUTE the code in the text file. [Well, you can using VBS 5.x&#039;s "Execute" statement, but that&#039;s a slow an clumsy way, in general.]<BR><BR>You might want to look at Server.Execute and/or look in the ASPFAQs for how to invoke any URL from ASP code.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts