Link to home
Start Free TrialLog in
Avatar of Pdesignz
PdesignzFlag for United States of America

asked on

How to include different include statements on page depending on type or condition?

Hello,

I am wondering if this can be done. I have a coupe of include pages that I am creating with simple text and would like to be able to include them on pages of 3 different sections. Sections are Getting Started, Patients and Scheduling. I know that I can create a single include for each section, but is it possible to have all three include statements on a single page and depending on what section you are in it will then include the corresponding text for each section.

thanks
Avatar of Wayne Barron
Wayne Barron
Flag of United States of America image

<% if condition="condition" then %>
<!--#inlcude file="file1.asp"-->
<!--#inlcude file="file2.asp"-->
<!--#inlcude file="file3.asp"-->
<% end if %>
(OR)
<% if conditionS="conditionS" then %>
<!--#inlcude file="file4.asp"-->
<!--#inlcude file="file5.asp"-->
<!--#inlcude file="file6.asp"-->
<% end if %>

Using an IF STATEMENT will help you to do near about anything that you want.
To have a better example, I need to now more information.
Like:
Are you using a database? If the information that you want to pase based on a record in a database?
(OR)
Are you looking at a QueryString and determining on what it states on what you want to show?

Let me know.
Carrzkiss
carkiss - common misconception and this cannot be done this way.
Checkout:
http://www.4guysfromrolla.com/webtech/022504-1.shtml
 
ASKER CERTIFIED SOLUTION
Avatar of Wayne Barron
Wayne Barron
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hmm well that article was correct at the time - I know I used to be a classic ASP developer and did extensive experiments at the time.  Looks like it must have been fixed in a new version of IIS or something like that so my apologies.
:) No problem Dave.

I love ASP :)
Carrzkiss
glad I could you you there "Pdesignz"
A thank you would have been awesome...   :)
Busy, busy day huh?

Have a good one.
Carrzkiss
Avatar of Pdesignz

ASKER

carrzkiss,

I appreciate the help, thank you very much, I accidentally hit the submit button prior to entering a comment, thanks again!!