Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 response.write question
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

e3stone
Average Member

USA
885 Posts

Posted - 06 May 2001 :  03:09:06  Show Profile  Send e3stone an AOL message
can you have an include statement in a response.write() statement? example:

Response.Write "<td valign=""top"" align=""center""><!--#include file=""news_inc.asp"" --></td>"

or does the include statement have to be outside the response.write()??


<-- Eric -->


http://insidewaco.com/forum/home.asp

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 06 May 2001 :  03:14:01  Show Profile  Visit HuwR's Homepage
no

Go to Top of Page

Doug G
Support Moderator

USA
6493 Posts

Posted - 06 May 2001 :  10:53:05  Show Profile
You have to be in HTML mode to include a file, so change your code to be like:
[code]
<%
..
Response.Write "<td valign=""top"" align=""center"">"
%>
<!--#include file=""news_inc.asp"" -->
<%
Response.Write "</td>"
..
%>





======
Doug G
======
Go to Top of Page

gor
Retired Admin

Netherlands
5511 Posts

Posted - 06 May 2001 :  16:30:22  Show Profile  Visit gor's Homepage
and all includes are included before any of the asp code is being interpreted.
So you can't do conditional includes in ASP 2.0

this:

<%
if X > 1 then
%>
<!--#include file="news_inc1.asp" -->
<%
else
%>
<!--#include file="news_inc2.asp" -->
<%
end if
%>


always includes both the include-file, even before the if...then...else..end if is being executed/interpreted.


Pierre
Join the Snitz WebRing
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.91 seconds. Powered By: Snitz Forums 2000 Version 3.4.07