473,699 Members | 2,506 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

cant get #include to work in .asp file.

I'm new to html and web coding, this is a simple one -
appreciate your help!

I'm attempting to get my browser bar links to reside in a
single .asp file to avoid multiple additions to pages
when I add a page to the site. I've done a lot of
reading and surfing, believe I know how to do it, but
can't get it to work.

I've installed IIS on my machine running XP pro, and have
created two .asp files, one called default.asp, the other
navigation.asp

both pages browse OK separately, but the navigation page
text does not appear within the default page at all (like
it's not getting "called" - here's the cut down code.

<html>
<head>
<title></title>
</head>

<body>
<% %>
<p>
This is the default page (filename default.asp)
<p>
<!- #include file="navigatio n.asp"->

</body>
</html>

-----------------

<html>
<head>
<title></title>

</head>
<body>
<% %>
This is the browser page (filename navigation.asp)

</body>
</html>
------------------
Thanks for your assistance
Regards
Greg
Jul 19 '05 #1
2 2139
Hi Greg,

Includes are done as:

<!-- #include file="navigatio n.asp" -->

Notice it's two dashes on either end, not one.

Also, if you are going to use this include for navigation, you may want to
do a virtual include as such:

<!-- #include virtual="/navigation.asp" -->

Doing a virtual include with the leading / will make it so that include is
always looked for from the root of your site. So, whether you have an asp
page in the root of your site, in a subdirectory, or in a directory 15
levels down, it you won't have to change your include directive in any of
them. If you do a file include, you'd wind up with an include like:

<!-- #include file="../../../../../../../../../../../../navigation.asp" -->

if you were a bunch of directories down.

Ray at home

"Greg" <el**********@b igpond.com> wrote in message
news:21******** *************** ******@phx.gbl. ..
I'm new to html and web coding, this is a simple one -
appreciate your help!

I'm attempting to get my browser bar links to reside in a
single .asp file to avoid multiple additions to pages
when I add a page to the site. I've done a lot of
reading and surfing, believe I know how to do it, but
can't get it to work.

I've installed IIS on my machine running XP pro, and have
created two .asp files, one called default.asp, the other
navigation.asp

both pages browse OK separately, but the navigation page
text does not appear within the default page at all (like
it's not getting "called" - here's the cut down code.

<html>
<head>
<title></title>
</head>

<body>
<% %>
<p>
This is the default page (filename default.asp)
<p>
<!- #include file="navigatio n.asp"->

</body>
</html>

-----------------

<html>
<head>
<title></title>

</head>
<body>
<% %>
This is the browser page (filename navigation.asp)

</body>
</html>
------------------
Thanks for your assistance
Regards
Greg

Jul 19 '05 #2
Remember that the include file is literally pulled out and plunked in your
page. So you won't need all those html tags.
"Greg" <el**********@b igpond.com> wrote in message
news:21******** *************** ******@phx.gbl. ..
I'm new to html and web coding, this is a simple one -
appreciate your help!

I'm attempting to get my browser bar links to reside in a
single .asp file to avoid multiple additions to pages
when I add a page to the site. I've done a lot of
reading and surfing, believe I know how to do it, but
can't get it to work.

I've installed IIS on my machine running XP pro, and have
created two .asp files, one called default.asp, the other
navigation.asp

both pages browse OK separately, but the navigation page
text does not appear within the default page at all (like
it's not getting "called" - here's the cut down code.

<html>
<head>
<title></title>
</head>

<body>
<% %>
<p>
This is the default page (filename default.asp)
<p>
<!- #include file="navigatio n.asp"->

</body>
</html>

-----------------

<html>
<head>
<title></title>

</head>
<body>
<% %>
This is the browser page (filename navigation.asp)

</body>
</html>
------------------
Thanks for your assistance
Regards
Greg

Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
7577
by: Fozya | last post by:
Hi, I have problems compiling some code that perfectly runs in VS.Net in the G++. Here is what I got: MyClass a; MyClass b; //assign values to a and b .......
0
1954
by: shan | last post by:
#include<fstream> #include<iostream> #include<string> #include<iomanip> #include<stdlib.h> #include<conio.h> #include<stdio.h> using namespace std; class library
5
2507
by: David Mathog | last post by:
One thing that can make porting C code from one platform to another miserable is #include. In particular, the need to either place the path to an included file within the #include statement or to very carefully define the order in which paths are searched with command line options on the compiler. Both can cause problems, especially when dealing with complex software distributions. It occurs ot me that by extending the C include...
1
1537
by: John | last post by:
Dear, We have 2 IIS server on win2000. we use the web server for upload file from server1 IIS to server2 IIS. We can connect from IIS1 to IIS2 success but the file unable to upload with below message. Would u help? If FileUpload_TXT.PostedFile.ContentLength = 0 Then Panel_FileInfo.Visible = False Exit Sub Else
2
1347
by: cv87cv | last post by:
I am trying to answer a question with regards to entering a set of numbers and text, and then I have got to search for a number and the text with it. I wish to enter the name on one line and the number on another line This is the code that I have written for inputting the numbers: #include "stdafx.h" #include <iostream> #include <fstream> #include <stdio.h>
9
2442
by: G123456 | last post by:
I am using Microsoft Visual Studio 2005 Prof. I am (only) using the C++ part of it (or i think so). When i am compiling my code i get the error "error C2653: 'std' : is not a class or namespace name" If i try to use "using namespace std" i get the error "error C2871: 'std' : a namespace with this name does not exist" But if i write "std::" i get a list of posibilitis.
5
1157
by: johnwebster9865 | last post by:
Hi This may be easy to most of you, but as a newbiw; I'm struggling. I am bringing in an include into a php file, but cant run the commands within the include. As an example, Within my php page I write: {php}include("content/myinclude.php");{/php}
5
1877
by: chevon1920 | last post by:
I am trying to do my assignment but I cant figure out how to get 8 data points per line to print to a file. Here is the assignment 1. Program asks the user to enter an odd number as a BASE, using this Base it creates 48 multiples of the BASE and prints in a data file "data_3b.txt", 8-data per line. 2. Program opens this data file, scans the contents of "data_3b.txt" file and counts all the odd data, and prints them on the screen: 4 data...
8
2470
by: Huma123 | last post by:
Hi! My problem is that i cant able to run a simple c program cause of this error... Unable to open include file 'stdio.h' unable to open include file 'conio.h' while these header files r present in my include files folder. i tried to write code to 2 different styles as i found in this forum someone has this prob too u people ans him that..
0
8686
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8615
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9173
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8911
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5872
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4375
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4627
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3057
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2345
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.