Author |
Topic  |
|
e3stone
Average Member
  
USA
885 Posts |
Posted - 06 May 2001 : 03:34:39
|
For those who are interested in utilizing response.write() statements throughout your code, here is a converter. http://internetsuperheros.com/convertcode.asp
I'm in the process of running a few of my pages through it. It seems to be converting error-free, but I'm still watching it closely.
As Huw pointed out in a previous post, you can't have include statements within response.write() statements.
<-- Eric --> 
http://insidewaco.com/forum/home.asp |
|
tilttek
Junior Member
 
Canada
333 Posts |
Posted - 07 May 2001 : 09:32:14
|
quote:
As Huw pointed out in a previous post, you can't have include statements within response.write() statements.
You might modify all include files as a Sub using the response.write then call it at the begining with all others includes, and change the actual include to a call to the new sub you created.
Philippe Gamache http://www.tilttek.com http://www.lapageamelkor.com |
 |
|
tilttek
Junior Member
 
Canada
333 Posts |
|
Deleted
deleted
    
4116 Posts |
Posted - 07 May 2001 : 10:55:13
|
There is one: "ASP Response Writer". Simple but useful program, which uses same idea. Search the net for this phrase.
Bulent Ozden History Foundation of Turkey bozden@tarihvakfi.org.tr |
 |
|
davemaxwell
Access 2000 Support Moderator
    
USA
3020 Posts |
Posted - 07 May 2001 : 12:26:02
|
quote:
As Huw pointed out in a previous post, you can't have include statements within response.write() statements.
If you're talking about includes with HTML code in it, then that's correct. You can use this if you want to post the same HTML code throughout your page (a header or footer comes to mind).
Dave Maxwell -------------- Proud to be a "World Class" Knucklehead |
 |
|
Doug G
Support Moderator
    
USA
6493 Posts |
Posted - 07 May 2001 : 20:04:37
|
quote: As Huw pointed out in a previous post, you can't have include statements within response.write() statements.
I'm straying from the original but you can utilize includes in mostly asp code. This code works, for example:
<%@ Language=VBScript %> <% ' Function WriteIt() Response.Write "This is from RW, "%> <!--#include file="test3.txt"--> <%Response.Write "Include follows:<br>" End Function %> <HTML> <HEAD> <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"> </HEAD> <BODY>
<P> </P> Here is the response.write test<br> <p><%=writeit()%></p>
</BODY> </HTML>
The text file is just a plain text, no script or <% in it.
====== Doug G ====== |
 |
|
davemaxwell
Access 2000 Support Moderator
    
USA
3020 Posts |
Posted - 08 May 2001 : 07:40:47
|
quote:
<!--#include file="test3.txt"--> The text file is just a plain text, no script or <% in it.
That's similar to what I said, but what you CAN do is this with plain text.
<% if month = 01 or month = 02 or month = 03 then Response.Write "<!--#INCLUDE FILE="qtr1.txt" --> elseif month = 04 or month = 05 or month = 06 then Response.Write "<!--#INCLUDE FILE="qtr2.txt" --> elseif month = 07 or month = 08 or month = 09 then Response.Write "<!--#INCLUDE FILE="qtr3.txt" --> else Response.Write "<!--#INCLUDE FILE="qtr4.txt" --> end if %>
Now, providing the info in qtr1.txt, qtr2.txt, qtr3.txt and qtr4.txt is plain text, this works fine. If it's got asp code in it, it won't do what you want....
Dave Maxwell -------------- Proud to be a "World Class" Knucklehead |
 |
|
|
Topic  |
|