Click to See Complete Forum and Search --> : Dynamic INCLUDE?


candelbc
12-06-2004, 05:33 PM
I am creating a simple FAQ page for a customer of mine, and wanted to save some time. The FAQ's are to be categorized in three different categories.

I thought that I might as well use an INCLUDE that would go out and get the information from the database, and create the FAQ's for each section.. To keep myself from changing 3 different include files, I thought I would just make one and pass a variable to it to determine just what fCATID (1, 2, or 3) to show.

Here's what I was using:

<!--#include file="scripts/get_FAQs.asp?fCatID=1"-->

So the real question, is there any way to dynamically use an INCLUDE statement?

Thanks in advance....

-Brad

russell
12-06-2004, 05:55 PM
check out 4 guys from rolla (http://www.4guysfromrolla.com/webtech/022504-1.shtml) on this very subject.

However, there is a better way to accomplish your task.

Create a function to determine which faqs to show, rather than dynamically building asp (as you'll see in the article above).

candelbc
12-06-2004, 05:58 PM
Perfect, thanks... I was apparently trying to make things too complicated..

Thanks for your help..
-Brad