Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    ASP




Include More Than 1 Include File


I want to be to call my menu from another file onto my page so that i dont have to add it to every page of my website. The problem is when i try to add it using the include method it says that only one include file is allowed on an ASP. The other include file is my connection string so i cant really take that out of the page because then nothing else will work!

How can i get the menu page included as well as the connecting string?

Have added the code below, i have highlighted the 2 include files that i want to use in blue, i have also left the div tag in for where i currently have the menu which is what i want to take out and have ther include file there instead, if that makes sense. Basically the bit in red i want to be able to remove from all of my pages and add the blue file above the red code in instead, but i dont know how!!!!! Code:




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Include Xml (w/ Xsl) In A Asp File?
I'm wondering if there's any way to include a XML file (with a XSL) in a ASP file? I've tried this <!--#include file="publications.xml"--> but the XML-code is included before it is formated according to the XSL and ends up being unformated.

Include File With Asp
how would i get something like this to work...

<!-- #include file="<%=Request.GetString("view")%>.txt" -->

i know wat i want and all but i can't figure out how to make it work.

Include File
I want to include files, a header and a footer to my asp page. The files i want to include its on another server, i can reach it with a www-url. Can i use the www-url to include the file to asp page?

Include A CGI File
How can I include a .cgi file in an .ASP file?
I've tried #include, Server.Transfer, and Server.Execute (yes, I know the last two are
only for ASP, but I tried it anyway).
If I have to, I guess I'll use ASPHTTP to do an http call to the file but first I wanted
to see if there was a more elegant way to do it
Is there an efficient way to include the output of a .cgi file in an ASP file?

Include File
Is there any way of having an include file as a string, eg:

<!--#include file="<%=strURL%>"-->

This doesn't seem to work, I get an error:

The include file '<%=strURL%>' was not found

Is my syntax wrong or isn't this possible?

Include File
<%
If rsResult.fields(3).value = "" Then
Response.Write "No File Available</td>"
Else
%>
<!-- #include file="Response.Write rsResult.fields(3).value" -->
<%
End If
%>


Include Iis Or Asp File
I do almost exclusively ASP on IIS, so I'm stupid when it comes to dealing with flat HTML on Linux/Apache.I have a static site on a Linux box where I want to do an include on an ASP file on an IIS box, and can't make it work.

I've tried <!--#include virtual="http://where.com/abc.asp"-->
and <!--#include virtual="http://where.com/abc.txt"-->

The ".txt" extension try was in case it's true what I heard that IIS won't let a remote server execute an ASP in an include file.

Also tried <!--#include file=...", even though I know from experience that Apache requires "virtual," not "file."

And also tried <!--#exec cgi=...".

NOT drawing any errors: the generated output just repeats the "<!--#include..." line instead of outputting results from the ASP file.

Include File
I want to execute another asp file at the end of my asp file.. How will I do that ?

Include File
I use include files a lot in ASP, but I was wondering if these files aren't actually part of ASP at all and you can use them in other web-based files.

Add Include File
how can i add include file that isnt in my directory i need to add a file called:

http://mpfile.hollosite.com/pafile/pafiledb.php

Include File
Trying to use a include file in an if statement and it is not working,I have tried it multiple ways and have keep getting errors or blank where it should be.

Code:

<%
IF session("sessionID") = "" THEN
Response.write (" <!--#INCLUDE file=""loginHeader.asp""--> ")
ELSE
Response.write (" <!--#INCLUDE file=""loggedinHeader.asp""--> ")
END IF
%>

INCLUDE An ASP File
How to include file into an ASP program? I was trying with this command:

<!-#include file="INC_file.asp" ->

but unfortunately it does not work but isn't any error message.IIS server shows primary site,but without informations from incuded file.How can I make it works?


Include In The Asp File
The current html file has to 2 drop down boxes. Depending on the selection chosen, there is a predetermined html file to load.My new asp file will replace the current html that has the 2 drop down boxes and it has its own set of design and graphics. So depending on the selection chosen, instead of loading the predetermined html file, I need to grap a section of the contents in this predetermined html file and add it to the content section of my asp file dynamic.

See, another very customised app. creates this predetermined html file dynamically and I have no access to this. My work around is to get the main content I want from this html and include it in my asp file dynamically.

Include File
I'm trying to include file using <!-- #include file="abc.asp"--> and it works without any
problem. but the problem is in if file name is in asp variable how should i write?

Include File
I have a few ASP pages within each ASP pages I have a block of Javascript that is different for each ASP page contained within the Javascript block is 20 lines that is same across the ASP pages. Is there any script I can enter that would include these lines from a text files or another ASP file?

Include File
Why can't I get the following running?

<%
Dim GetODBCdsn
GetODBCdsn = <!--#include virtual="connectionssqlconnection.txt" -->
Response.Write(GetODBCdsn)
%>

ASP File Include
I have a #Include statement in an Asp page. I want to find the path of the included file at runtime. How can I do that?

Include Asp File
I need to include an asp file from another server. Code:

<!--#include file="SicurezzaDip.asp"-->

I think that is the normal way to do it. I've also used the code shown below, but it doesn't seem to work..Is it possible to Include asp files from another server ? How can i do it ? Code:

<!--#include file="http://81.74.60.30/Asp/SicurezzaDip.asp"--> ..

Include File
I have a menu that I use as an include file. it's a horizontal menu that extends to show sub menus.

the table the menu is in has silver background. my problem is that when i use the page as a include file the background color for the menu expands to cover the whole page. is there an issue with the include files that would cause the table color to migrate to all the tables?

if any one knows another way i can use this menu as an include file and keep the background color from migrating it would be greatly appreciated.

Include File
I just want to ask a basic question that how can i include a file in asp dynamically

i have tried the code but it is not working:

<%
FileName= "filename.asp"
<!--#include file="<%=FileName%>"-->
%>

Include File
I used to do a lot with asp and now I'm going to use asp.net technology In asp I had a file functions.asp with all my functions I used on several pages like generating connection to database, generating links on pages and things like that.

Than I had <!-- #include file="..includefunctions.asp"--> statement on
each asp page, at the top of the page.

I would like to know, how is this in asp.net You use the same procedure or is there some other, better way to include functions? I read one book but I didn't found any instructions?

Images With Include File
I would like to know is it poss to show images from the images folder when used within an include file? Folders I have are:

inc
images

The include fie is requested via a Querystring, but images don't show.
I've tried:

../images/img1.jpg
images/img1.jpg

still blank.

Variable In Include File
It is possible to add variable into the include file.

<!--#include file="../info/<%=strfoldername%>/notetosomeone.asp"-->

strfoldername is from my database. It doesn't work. Anyone knows how to solve this problem. Or has other way to do it.

I Want To Include An ASP File From Another Site
Is there a way I can include an ASP file on somebody elses page without useing Java or an Iframe from another web site?

I've tried using #include file but it will only include local files.. is it possible to do this with ASP?

Include File And Images
Can someone please give me advice or help me ...I don't know why the include file / image doesn’t work. What did I do wrong?

Here is my project:

In the wwwrootmyproject has the includes folder, images folder, and index.asp.
wwwrootmyprojectindex.asp
wwwrootmyprojectimages
wwwrootmyprojectincludesheader.htm
wwwrootmyprojectmathcalculas.asp

I create an header.htm page and save it in the includes folder. Because, I want to use the header.htm page in other places.

The images folder contains all the images in there.

Here is my header.htm page:

<table>
<tr>
<td>
<img src=”images/header.jpg”>
</td>
</tr>
</table>
==

Index.asp page - the include works..the header image shows.

<body>
<!--#Include File="includes/header.htm"-->
</body>


here is a problem, I created a Math folder in the myproject. In the math folder I have a calculas.asp page.

In the calculas.asp, I've included the header.htm page

Here is what I did in the calculas.asp page.....

Using A Varrible In A File With Include
The file that I am trying to use is as below:

Link_Cat_6.asp

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

<%Dim Link_Category_ID%>

<%Link_Category_ID = 6%>

I am trying to use the varriable Link_Category_ID on the included page display_links.asp in an SQL string.

I am getting an error in the SQL string WHERE clause saying that the varrible Link_Category_ID doesnt exist i.e. it says that the clause is incomplete.

I can't see why its not accepting the varriable in the file.

Include File In Global.asa
I have written general purpose functions in one of the include file, I want
to use the same in the global.asa. Do you know how to use include file in
global.asa

ASP 3.0: Doing An Offsite File Include?
I have an ASP file on one server that I want to include in an ASP page on another server. How do I do this? The normal ASP include or 'execute' only works for local files.

Is there any Javascript i could use to do this? Or is there an easy way to do it with ASP?

ASP 0126 Include File
I'm using IIS 5.0 Win2K (SP3). IIS sometime reports ASP 0126 "Include file not found" error on several .asp pages. 've checked my ASP coding its alright and works lot of time but some time it generates the above mentioned error.I've searched MSDN, knowledge base articles and found 3 different articles related to it but all of these are fixed in SP3 and I've SP3 already installed.

Include A Tango File
I have a tango file (a .taf file) which I want to include in an asp page.
An include directive such as <!--#include file = "header.taf"--> does not work.
Any ideas on how to make it work?

Include File Written In ASP
I want to allow my users extensions and things via include files. I need the script to look something like this...

<!-- #INCLUDE FILE="<%=grargareg%>" -->

but ASP doesn't accept values like this... is there a way around it some how?

One Last Try. Error When Using #include File=
I have perhaps not explained myself clearly, so I'll try it this way.
In the code below, where it says "I'd like to include my navigation
bar here" is the place I'd like to insert a navigation bar from a page
I have called navbar.asp

For some reason, when I insert the <! #include file="navbar.asp" -->
in that place, I get an error, a long, hairy error. Can you please
look at the code below, and tell me how I should write the code so
that the include statement will work? Code:

Session Within Include File
i have set session("username") = "BOB" , in the main(main.asp) page. i have another page(welcome.asp) that has an include file(user.asp) that display that session. when i call the welcome.asp the session is blank. The session blank when i display it in user.asp but not in welcome.asp. Why is that? isnt session available to all pages?

Include File Or Database
I'm working on an application that I will make use of "constants". I put
contants in quotes becuase they will change periodically (Logo path, css
path, psw expiration times etc). From a system admin standpoint does it make
sense to put them in a constants file, or put them in a database?

My database argument is that they can be modified by the customer via some
web forms.

My contants include file argument is that they can't be modified as easiliy
by a half wit customer, and there is no database overhead.

Using If/else To Decide On An Include File?
Is it possible to code the correct file name of the include file on my document, using the if/else statement? The filename will be dependant upon a variable being passed through into this document called PageID,

i.e. if pageID = 4, then filename = includefile4.asp

What is the correct syntax for this?

Include File Extensions
I am confused about how to best use an include file for a site. I came across a file that has an extension of .inc, but have also seen .asp and .htm used. The difference between the last two is obvious to me, but why would one use an extension of .inc? Furthermore, is there a way other than using the ../../../ method of pointing to file in path to just indicate its reference from the root web, so no matter where in the site, ie., sub-directories, I put an include file, the links all point to the same places.

Showing An Include File
I would like to have the option to show and include file which has a one line table with a red background and printing to pull info out of a SQL database but only if there is data in the table. Basically it is to show breaking news when it happens before there is an article. The SQL table is called breakingnews and the column is called brknews. If the column brknews has nothing in it, I don't want the table to show up on the page but if there is data in it, I want the colored table and text to show up on the page.

#INCLUDE FILE= Variable
is it in any way possible to include a file specified by a variable name?

Unable To Include File
I have a file in a top level directory called inc_protect.asp. I'm trying to include that file in a page called tree.asp. The code to include the file is

<!--#Include file="inc_protect.asp"-->

When I try that line or

<!--#Include file="../inc_protect.asp"-->

or

<!--#Include file="http://mysite/inc_protect.asp"-->

The server returns an error saying that the file is not found. Anyone have any suggestions on this? All files are asp script. The tree.asp is in a folder called SupServ directly below inc_protect.asp... Can these not go backwards?

Include File Outside Web Site
Is it possible to have an include file that resides outside of the web site parent folder? For instance, lets say you have several websites under Inetpub/global/websites/ but the include file is in Inetpub/inc/ I get a file not found error trying file/virtual starting with the root and even using C:/Inetpub. Example

Inetpub/global/websites/website1/global.asa

Inside global.asa is the statement

<--Include file="C:/inetpub/inc/functions.inc"-->

Can Not Find The Include File
i have been trying to create a page that has the include file but it is not able to find the include file. the code is as follows:

<!--#include file="Connections/connECC.asp" --> (it is listed in index.asp page)

My site map is as follows:

Connections
(under Connections folder) connECC.asp
Templates
index.asp

Include File Within Script
I have the below code to auto-email a customer. What is the syntax to include a file in the email? <!--#include

file="agreement_inc.asp" -->

HTML = HTML & "...just some text...<br>"
HTML = HTML & <!--#include file="agreement_inc.asp" -->
HTML = HTML & "</body>"
HTML = HTML & "</html>"

News Include File
I'm trying to include file if ?news=news by this code but is not working. Code:

<% news_page = request.queryString("news")

if news_page <> "" then

include file="test.asp"

end if
%>

Printing Out INCLUDE File
here's what I have: Code:

Response.Write("<!--#include file='sub/apps/" & rs.Fields(0).Value & "'--></td>")
for some reason the webserver isn't "parsing" out the include file and just prints out

Code:
<!--#include file='/sub/apps/canvas.asp'--></td>

I've tried everything.

Include File Efficiency
ok so include file is a very useful and powerful tool that asp has. what i'd like to know is how efficient is it since it to looks through all the pages that are lincluded on a single page even if they are not 'used' via an if statement.

is this a memory hog if you have alot of pages that have multiple includes? does this cause any other problems/issues?

Is It Possible To Use One Include File That Contains And Call Many?
I was reading on a few forums and googling all morning trying to find code for using one include file to call multiple include files for various asp pages. For example, we have created nav bars for several regions in the US.

As such, each region needs a unique top and right nav to include geographic specific information. I've created 6 include files, but I would like to put all the nav include files in one main include file and call the unique include files as needed.

I started doing a select case or If then functions. Now once that's done, (being a newbie) I don't understand how to write the asp code that calls the unique include file on the page where it applies. Code:

Does Anybody Know How To Include A Seperate ASP File?
I just want to include a function in a seperate file so i can have it on a bunch of pages. What tag should i use?

Use Include File Or Object?
I have an include file - myUtilities.asp - containing 20-30 functions.
Would it waste less ressources if the functions were in an object instead?
There's about 20 pages including the file.

Functions In Include File
I have an Intranet that I have developed which uses
templates and all ASP functions in separate included ASP
files.

For instance, functions.asp gets included in each page and
does some of the following:

- ensures users are logged in
- defines date functions
- contains many functions used by various pages that call
the include

The functions.asp file is about 15k. Is it expensive on
the server to include that in each asp file called by the
server even though only say 4 of about 35 functions may be
used by that particular page. I.e. I have a function that
takes address information and creates an html formatted
address block. Obviously that is only used on pages with
an address but it gets 'included' in every page.


Copyright © 2005-08 www.BigResource.com, All rights reserved