If Then Statement for a Website

I am working on a website and would like to know that if the link is something like http://www.example.com/securit/pci-dss if I can have a couple of different files appear in the navigation?

I am using Helicon Rewrite so that is why the URL looks that way (it is not http://www.example.com/securit/pci-dss.asp or http://www.example.com/securit/pci-dss/default.asp)

For example, when they are on this page, I would like the navigation to be
<!--#INCLUDE FILE="../includes/securitynav.asp" -->

Open in new window


How can I accomplish this?

Thank you!
LVL 29
coreybryantAsked:
Who is Participating?
 
EyalCommented:
<% if condition then %>
<!--#INCLUDE FILE="../includes/securitynav.asp" -->
<%elseif condition then%>
<!--#INCLUDE FILE="../includes/securitynav1.asp" -->
<%else%>
<!--#INCLUDE FILE="../includes/securitynav2.asp" -->
<%end if%>
0
 
coreybryantAuthor Commented:
Thanks!  If I have seven different includes, do I just repeat
<%else%>
<!--#INCLUDE FILE="../includes/securitynav2.asp" -->

Open in new window

until I am done?  Do I need to put the file name anywhere in there?
0
 
EyalCommented:
repeat the <%elseif condition then%>

pay attention that when the iis engine parse the code he will still generate in memory all the files, so if you have parameter defined inside you will get error saying variable already defined (solution will be to remove it outside the include scope)
0
 
coreybryantAuthor Commented:
Thank you very much!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.