Multiple ASP scripts within one file: ERRORS!

Results 1 to 4 of 4

Thread: Multiple ASP scripts within one file: ERRORS!

  1. #1
    Eliot Lee Guest

    Default Multiple ASP scripts within one file: ERRORS!

    I am trying to put two simple scripts into a one .asp file.<BR>One script is being included (AdRotator) and then the other is a simple script placed within the file.<BR><BR>The adrotator file is located at <BR><BR><BR><BR>I have used the following codes to "include" the file:<BR><BR>&#060;!--#include virtual="/asp/rotator.asp"--><BR><BR>The file I am creating is located at <BR><BR><BR><BR>(I do have three asp forms within the page that work properly with the included adrotator script, but with the date routine, I keep getting error messages. I did try a number of things, like adding the date routine codes into the rotator file, but again, I get error messages.)<BR><BR>However, when I try to add the following codes to the file, I get an error message.<BR><BR>CODES:<BR><BR>&#060;% Response.Write(FormatDateTime(Now(),1) & " " )&#037;&#062; <BR><BR>ERROR MESSAGE:<BR><BR>Active Server Pages error &#039ASP 0140&#039 <BR><BR>Page Command Out Of Order <BR><BR>/asp/rotator.asp, line 1 <BR><BR>The @ command must be the first command within the Active Server Page. <BR><BR>If anyone knows how I can fix this, I would greatly appreciate it. Please feel free to email me at if you have a workable solution.<BR><BR>TIA.<BR><BR>Regards,<BR><BR>Eliot Lee

  2. #2
    KPW Guest

    Default RE: Multiple ASP scripts within one file: ERRORS!

    Do you know the code of the rotator.asp file? My guess is that there is an @ command in the rotator.asp file. When you include this file in your page, that command is most likely no longer the first line in the script.

  3. #3
    Eliot Lee Guest

    Default RE: Multiple ASP scripts within one file: ERRORS!

    The first line of the rotator.asp file is:<BR><BR>&#060;%@language=perlscript&#037;&#062; <BR><BR>I tried inserting this line in the newdefault.asp file and it did not run. The problem does not seem to be with the rotator.asp file. See, I have created a second file with JUST the include statement for the rotator.asp file. It is located at<BR><BR><BR><BR>(It works just fine.)<BR><BR>The problem seems to be with the date routine.<BR><BR>When I insert the following code in the file, I get those annoying error messages.<BR><BR>&#060;% Response.Write(FormatDateTime(Now(),1) & " " )&#037;&#062; <BR><BR>(I am new to active server programming, so please be explicit about what I need to do to insert a date routine that will work with the file above.)<BR><BR>Thanks for your time and responding so quickly.<BR><BR>Regards,<BR><BR>Eliot Lee

  4. #4
    Eliot Lee Guest

    Default RE: Multiple ASP scripts within one file: ERRORS!

    I figured it out! Yea! What I did was add perl codes for the date routine between &#060;% &#037;&#062; in the rotator.asp file. Then I inserted the appropriate codes (e.g., &#060;%=$Month&#037;&#062;) after the body tag. <BR><BR>Works great.<BR><BR>Check it out at<BR><BR><BR><BR>Regards,

Posting Permissions

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