[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 267
  • Last Modified:

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!
0
coreybryant
Asked:
coreybryant
  • 2
  • 2
2 Solutions
 
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

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now