Solved

Including with ASP

Posted on 1998-12-28
2
139 Views
Last Modified: 2013-12-25
I need to build a html-page by putting it together from three diffrent pages. Also, when I call the pages, I must be able to use a varialbe.

To include files I know I can use:
<!-- #include file ="G:\xxxx\xxxx.inc" -->

but what should I do if I want to something like this:
<!-- #include file = "G:\xxx\<%=variable%>\xxxx.asp -->

0
Comment
Question by:MHQ
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 10

Accepted Solution

by:
MasseyM earned 200 total points
ID: 1857477
To use the include files, you have to know the path before hand, so you cannot include it with the vairale.  But, you could do something like this. Include a file called g:\xxx\redir.asp and within that file, get the variable and then rdirect to the appropriate page.  That is theonly way that I see that will work.
0
 
LVL 1

Expert Comment

by:rajgn
ID: 1857478
Another solution could be the conditional Include.
Write a If...else or switch and check for various values of the variable and write the include accordingly. like this...

<% if var = "var1" then %>
<!-- #INCLUDE file="var1.inc"-->
<% elseif var = "var2" then %>
<!-- #INCLUDE file="var2.inc"-->
<% elseif var = "var2" then %>
<!-- #INCLUDE file="var3.inc"-->
<% else %>
<!-- #INCLUDE file="nothing.inc"-->
<% end if %>

0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Learn by example how to specify CSS selectors for Selenium WebDriver test automation software.
There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question