Forums

ASP

This topic is locked

How do I do this dynamically?

Posted 04 Apr 2003 18:01:59
1
has voted
04 Apr 2003 18:01:59 Phil Grimpo posted:
Here's the situation, usually when I program, I make small files that will do something like gather a recordset and show something like the top news headlines, etc. This file is set in a folder, and is dynamically included on the pages using a server-side include.

I want to have a site where I have templates with different regions. The user would be able to select the region and from a drop down, select which included component he/she wanted. My first idea was to have the value of the drop-down box simply be the code for the include, ie. <!--#include virtual="/IncludedFiles/Footer.asp"-->
However, this does not work because the server is pulling this text from the database and it merely spits the text out to the page, it does not "re-render" it and do the include.

Does anyone have any ideas on how I might be able to accomplish what I want to do? I can't actually write the included module's code (ie. news headlines) into the page because that code itself has to be executed. Understand?

Any help would be GREATLY appreciated!

-Grimps

Phil Grimpo
Executive Director
Inspirmedia

Replies

Replied 05 Apr 2003 02:03:18
05 Apr 2003 02:03:18 Owen Eastwick replied:
Try:

<% Server.Execute("/IncludedFiles/Footer.asp" %>

Regards

Owen.

-------------------------------------------------------------------------------------------
Used programming books and web development software for sale (UK only): www.tdsf.co.uk/tdsfdemo/Shop.htm

Developer services and tutorials: www.drdev.net

Multiple Parameter UD4 / Access 2000 Search Tutorial: www.tdsf.co.uk/tdsfdemo/

Reply to this topic