473,698 Members | 2,503 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to 'INCLUDE' an ASP file?

Hello,
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 :(

There isn't any error message. IIS server shows primary site, but without
informations from incuded file.

How can I make it works?

With the best Regards,
MEMENTO

:)
Nov 7 '05 #1
8 2047
"memento" <me********@gaz eta.pl> wrote in message
news:dk******** **@inews.gazeta .pl...
Hello,
How to include file into an ASP program? I was trying with this command:

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


Use double dashes:

<!-- #include file="INC_file. asp" -->
Nov 7 '05 #2
And you can use include files also

<!-- #include virtual="header .inc" -->

---
http://www.KeepTrackOfIt.com - Find the lowest gas prices in your area
graphically

Nov 8 '05 #3
The problem was with the lack of a double hyphen, not this. But for the
record, there is no advantage to using a .inc extension, and plenty of
disadvantages. The main one is security. A person who's up to no good can
figure out the name of the .inc file, and then download it and read the
text. With an asp extension, this cannot be done.

Believe it or not, I've actually seen an application which had the database
login info, including password, in an include file with a .inc extension.

"KeepTrackOfIt. com" <in**@keeptrack ofit.com> wrote in message
news:11******** **************@ g44g2000cwa.goo glegroups.com.. .
And you can use include files also

<!-- #include virtual="header .inc" -->

---
http://www.KeepTrackOfIt.com - Find the lowest gas prices in your area
graphically

Nov 8 '05 #4
M P
Is this true? Does include file be seen on the browser cache? How do you see
these files?

"middletree " <mi********@ver ywarmmail.com> wrote in message
news:%2******** ********@TK2MSF TNGP14.phx.gbl. ..
The problem was with the lack of a double hyphen, not this. But for the
record, there is no advantage to using a .inc extension, and plenty of
disadvantages. The main one is security. A person who's up to no good can
figure out the name of the .inc file, and then download it and read the
text. With an asp extension, this cannot be done.

Believe it or not, I've actually seen an application which had the
database login info, including password, in an include file with a .inc
extension.

"KeepTrackOfIt. com" <in**@keeptrack ofit.com> wrote in message
news:11******** **************@ g44g2000cwa.goo glegroups.com.. .
And you can use include files also

<!-- #include virtual="header .inc" -->

---
http://www.KeepTrackOfIt.com - Find the lowest gas prices in your area
graphically


Nov 9 '05 #5
I've never seen them in a browser cache, but middletree is right. I
didn't recommend it, I was just saying it was an option.

More info here:

http://www.w3schools.com/asp/asp_incfiles.asp

---
http://www.KeepTrackOfIt.com - Find the lowest gas prices in your area
graphically

Nov 9 '05 #6
What middletree meant IMO is that if you take an improper name for an
include file such as "tools.txt" then someone trying this URL would get the
file... As ASP files are processed it offers quite a kind of protection (for
example a .asp include file that contains only functions and subs would just
produce an empty HTML page client side when served).

--
Patrice

"M P" <ma**@textguru. ph> a écrit dans le message de
news:%2******** ********@TK2MSF TNGP14.phx.gbl. ..
Is this true? Does include file be seen on the browser cache? How do you see these files?

"middletree " <mi********@ver ywarmmail.com> wrote in message
news:%2******** ********@TK2MSF TNGP14.phx.gbl. ..
The problem was with the lack of a double hyphen, not this. But for the
record, there is no advantage to using a .inc extension, and plenty of
disadvantages. The main one is security. A person who's up to no good can figure out the name of the .inc file, and then download it and read the
text. With an asp extension, this cannot be done.

Believe it or not, I've actually seen an application which had the
database login info, including password, in an include file with a .inc
extension.

"KeepTrackOfIt. com" <in**@keeptrack ofit.com> wrote in message
news:11******** **************@ g44g2000cwa.goo glegroups.com.. .
And you can use include files also

<!-- #include virtual="header .inc" -->

---
http://www.KeepTrackOfIt.com - Find the lowest gas prices in your area
graphically



Nov 9 '05 #7
You misunderstood his point. Server-side includes (SSI) will never show up
in a browser cache. Only client-side includes:
<script src="...">

What he is saying is, that if you use an easily-guessable name for your
include file, say: scriptlibrary.i nc somebody will be able to browse to it
by typing its address in the browser's address bar. Since the inc extension
is not mapped to be executable (by default, this is configurable), the text
in the page will be shown in the browser. Try it with your own inc file. By
changing the inc extension to asp, you prevent this: when the file is
browsed to, it is executed, not displayed.

Bob Barrows

M P wrote:
Is this true? Does include file be seen on the browser cache? How do
you see these files?

"middletree " <mi********@ver ywarmmail.com> wrote in message
news:%2******** ********@TK2MSF TNGP14.phx.gbl. ..
The problem was with the lack of a double hyphen, not this. But for
the record, there is no advantage to using a .inc extension, and
plenty of disadvantages. The main one is security. A person who's up
to no good can figure out the name of the .inc file, and then
download it and read the text. With an asp extension, this cannot be
done. Believe it or not, I've actually seen an application which had the
database login info, including password, in an include file with a
.inc extension.

"KeepTrackOfIt. com" <in**@keeptrack ofit.com> wrote in message
news:11******** **************@ g44g2000cwa.goo glegroups.com.. .
And you can use include files also

<!-- #include virtual="header .inc" -->

---
http://www.KeepTrackOfIt.com - Find the lowest gas prices in your
area graphically


--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Nov 9 '05 #8

http://www.powerasp.com/content/code...s/includes.asp

"memento" <me********@gaz eta.pl> wrote in message
news:dk******** **@inews.gazeta .pl...
Hello,
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 :(

There isn't any error message. IIS server shows primary site, but without
informations from incuded file.

How can I make it works?

With the best Regards,
MEMENTO

:)

Dec 4 '05 #9

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

Similar topics

7
3547
by: mescaline | last post by:
Hi, Suppose a_file.cpp contains a function a_function() Now to include it in main_file.cpp I just do #include "a_file.cpp" and I'm all set. i recently came across this seemingly roundabout way to do this in 3 steps: 1. Add in main_file.cpp
6
4338
by: wukexin | last post by:
Help me, good men. I find mang books that introduce bit "mang header files",they talk too bit,in fact it is my too fool, I don't learn it, I have do a test program, but I have no correct doing result in any way. Who can help me, I thank you very very much. list.cpp(main program) //-------------------------------------------------------------------------- - #pragma hdrstop #pragma argsused
28
3874
by: Ramesh | last post by:
Hi, I am currently maintaining a legacy code with a very very large code base. I am facing problems with C/C++ files having a lot of un-necessary #includes. On an average every C/C++ file has around 150+ .h files included. I find 75% of the files unnecessary and could be removed. Considering the fact that I have a huge code base, I can't manually fix it. Are there any tools that would report un wanted .h files?
60
8283
by: Derrick Coetzee | last post by:
It seems like, in every C source file I've ever seen, there has been a very definite include order, as follows: - include system headers - include application headers - include the header associated with this source file For example, in a file hello.c: #include <stdio.h>
9
13106
by: bill | last post by:
Forget the exact definition of difference between, #include <foo.h> and #include "bar.h" Normally foo.h is a standard header file, so it's path is not defined in compiler option, but I am curious how compiler find it.
12
1981
by: Francois Grieu | last post by:
Can #include safely use a preprocessing token, as in #define HEADERFILE "stdio.h" #include HEADERFILE int main(void) {return printf("Hello, world\n")*0;} TIA, François Grieu
9
6410
by: zolli | last post by:
Hi, I've been banging my head against this for a while now. Hoping someone here can shed some light on what's going on. On including stdlib.h in a file, I'm seeing the following errors: ----BEGIN ERRORS---- gcc -g3 -DUSE_LIBC -Wall -c -I../mm -I../include -I/usr/include -I/usr/include/linux -o mm_tree_test.o mm_tree_test.c
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...
3
2705
by: Arpi Jakab | last post by:
I have a main project that depends on projects A and B. The main project's additional include directories list is: ...\ProjectA\Dist\Include ...\ProjectB\Dist\Include Each of the include directories contain a file named "cppfile1.h". In my main project I #include "cppfile1.h". I rely on the order of paths in additional include directories list to get file cppfile1.h from ProjectA and
6
2119
by: tshad | last post by:
In my User control, I tried to do this: *************************************************************************** <Script runat="server"> Public ClientName As String = "<!-- #include file = ...\includes\StaffingHeaders.inc -->" </Script> <%=ClientName%> ****************************************************************************
0
8680
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
8609
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
9169
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...
0
9030
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8899
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,...
1
6528
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5861
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
4371
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...
3
2007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.