Print Page | Close Window

<!--include-->

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=3315
Printed Date: 29 March 2026 at 6:27pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: <!--include-->
Posted By: beginner
Subject: <!--include-->
Date Posted: 06 June 2003 at 6:20am

Hi,

i was wondering if you can use a variable inside the include statement?

 <%Response.Write "<!--#include file="""& mainpage & ".asp""" & "-

"%>




Replies:
Posted By: ultramods
Date Posted: 06 June 2003 at 6:51am
Try using server.Execute("mainpage.asp")


Posted By: MorningZ
Date Posted: 06 June 2003 at 7:43am

and to answer the question

"no, you cannot"

include statements run before the ASP gets evaluated



-------------
Contribute to the working anarchy we fondly call the Internet


Posted By: Boecky
Date Posted: 11 June 2003 at 5:39am

Yes, idd, here you can read the full explanation:

http://www.w3schools.com/asp/asp_incfiles.asp - http://www.w3schools.com/asp/asp_incfiles.asp




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net