473,796 Members | 2,648 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP Include is not working.

All,

I am looking to re-work my main page and have been using include statements on it and I now want to add another section, but this time my include is ASP. If I pull the ASP up by itself it works just fine. How ever when I have it in my default.htm page the ASP does not execute so when I look at the source I see all the ASP Code. any idea what I need to set?

Here is the code in my main page for the include.

<P align=CENTER style="FONT-FAMILY: Tahoma"><!--#include file="public/nursing.htm"--></P><hr />

<!--#include file="public/MENU.asp"--></td>

MENU.asp - works if I type it in the address bar, but when I have it in my include it does not work.

MENU.ASP

<%@ Language=VBScri pt %>

<% Option Explicit %>

<% Response.Buffer = true %>

<%

Dim conn, rs, rs2, mySQL, mySQL2, dbPath, myDate
Set Conn = Server.CreateOb ject("ADODB.Con nection")

conn.Open "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=D:\intra net\protected\b ethesda.mdb" ';User Id=admin;Passwo rd="

conn.Properties ("Jet OLEDB:Max Buffer Size") = 256

mySQL = "SELECT * FROM MENUS WHERE MEN_ID=1"

set rs = conn.Execute(my SQL)
myDate = rs("MEN_DATE")

%>

<html>

<head>

<title>Menu Page</title>

</head>

<body>

<table align='center'>

<tr align=center >

<td><span style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">

<%Response.writ e FormatDateTime( myDate,1)%><br />

Dinnig Room Menu<BR /><BR />

Starters<BR />

<span style=color=<%= rs("MEN_SOUP1_C OLOR")%>><%=rs( "MEN_SOUP1" )%></span>

<% if rs("MEN_SOUP1_V ") = "on" Then %><IMG SRC="../images/icon_vegetarian .gif" /><%end if %>

<% if rs("MEN_SOUP1_H C") = "on" Then %><IMG SRC="../images/icon_lowfat.gif " /><%end if %<br />

<span style=color=<%= rs("MEN_SOUP2_C OLOR")%>><%=rs( "MEN_SOUP2" )%></span>

<% if rs("MEN_SOUP2_V ") = "on" Then %><IMG SRC="../images/icon_vegetarian .gif" /><%end if %>

<% if rs("MEN_SOUP2_H C") = "on" Then %><IMG SRC="../images/icon_lowfat.gif " /><%end if %<br /><br />

Entrees<br />

<span style=color=<%= rs("MEN_ENTREE1 _COLOR")%>><%=r s("MEN_ENTREE1" )%></span>

<% if rs("MEN_ENTREE1 _V") = "on" Then %><IMG SRC="../images/icon_vegetarian .gif" /><%end if %>

<% if rs("MEN_ENTREE1 _HC") = "on" Then %><IMG SRC="../images/icon_lowfat.gif " /><%end if %<br /

<span style=color=<%= rs("MEN_ENTREE2 _COLOR")%>><%=r s("MEN_ENTREE2" )%></span>

<% if rs("MEN_ENTREE2 _V") = "on" Then %><IMG SRC="../images/icon_vegetarian .gif" /><%end if %>

<% if rs("MEN_ENTREE2 _HC") = "on" Then %><IMG SRC="../images/icon_lowfat.gif " /><%end if %<br /

<span style=color=<%= rs("MEN_ENTREE3 _COLOR")%>><%=r s("MEN_ENTREE3" )%></span>

<% if rs("MEN_ENTREE3 _V") = "on" Then %><IMG SRC="../images/icon_vegetarian .gif" /><%end if %>

<% if rs("MEN_ENTREE3 _HC") = "on" Then %><IMG SRC="../images/icon_lowfat.gif " /><%end if %<br /

Vegetables<br />

<span style=color=<%= rs("MEN_VEG1_CO LOR")%>><%=rs(" MEN_VEG1")%></span>

<% if rs("MEN_VEG1_V" ) = "on" Then %><IMG SRC="../images/icon_vegetarian .gif" /><%end if %>

<% if rs("MEN_VEG1_HC ") = "on" Then %><IMG SRC="../images/icon_lowfat.gif " /><%end if %<br /

<span style=color=<%= rs("MEN_VEG2_CO LOR")%>><%=rs(" MEN_VEG2")%></span>

<% if rs("MEN_VEG2_V" ) = "on" Then %><IMG SRC="../images/icon_vegetarian .gif" /><%end if %>

<% if rs("MEN_VEG2_HC ") = "on" Then %><IMG SRC="../images/icon_lowfat.gif " /><%end if %<br /

<span style=color=<%= rs("MEN_VEG3_CO LOR")%>><%=rs(" MEN_VEG3")%></span>

<% if rs("MEN_VEG3_V" ) = "on" Then %><IMG SRC="../images/icon_vegetarian .gif" /><%end if %>

<% if rs("MEN_VEG3_HC ") = "on" Then %><IMG SRC="../images/icon_lowfat.gif " /><%end if %<br /

<span style=color=<%= rs("MEN_VEG4_CO LOR")%>><%=rs(" MEN_VEG4")%></span>

<% if rs("MEN_VEG4_V" ) = "on" Then %><IMG SRC="../images/icon_vegetarian .gif" /><%end if %>

<% if rs("MEN_VEG4_HC ") = "on" Then %><IMG SRC="../images/icon_lowfat.gif " /><%end if %<br />

Assorted Fresh Fruit<br />

Garden Salads<br /><br />

Grab and Go<br />

<span style=color=<%= rs("MEN_GRAB_GO _COLOR")%>><%=r s("MEN_GRAB_GO" )%></span>

<% if rs("MEN_GRAB_GO _V") = "on" Then %><IMG SRC="../images/icon_vegetarian .gif" /><%end if %>

<% if rs("MEN_GRAB_GO _HC") = "on" Then %><IMG SRC="../images/icon_lowfat.gif " /><%end if %<br /><br />

Grill Special<br />

<span style=color=<%= rs("MEN_GRILL_C OLOR")%>><%=rs( "MEN_GRILL" )%></span>

<% if rs("MEN_GRILL_V ") = "on" Then %><IMG SRC="../images/icon_vegetarian .gif" /><%end if %>

<% if rs("MEN_GRILL_H C") = "on" Then %><IMG SRC="../images/icon_lowfat.gif " /><%end if %<br /><br /></span>

</td>

</tr>

</table>

</body>

</html>

Thanks,
Rodger

Aug 15 '08 #1
2 4294
Rodger wrote on 15 aug 2008 in microsoft.publi c.inetserver.as p.general:
>
I am looking to re-work my main page and have been using include
statements on it and I now want to add another section, but this time
my include is ASP. If I pull the ASP up by itself it works just fine.
How ever when I have it in my default.htm page the ASP does not
execute so when I look at the source I see all the ASP Code. any idea
what I need to set?

Here is the code in my main page for the include.

<P align=CENTER style="FONT-FAMILY: Tahoma"><!--#include
file="public/nursing.htm"--></P><hr />

<!--#include file="public/MENU.asp"--></td>

MENU.asp - works if I type it in the address bar, but when I have it
in my include it does not work.
MENU.asp is not executed as an asp page,
but,
and that is what include is supposed to do,
the source is just inserted as a text string.
so,
if the mail page is main.htm, there is no ASP rendering.

Read up on ASP include specs.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Aug 15 '08 #2
Thanks, I am not sure where my head was . . . . . I even wrote that it was
in my default.htm Works great when I do it right!
"Evertjan." <ex************ **@interxnl.net wrote in message
news:Xn******** ************@19 4.109.133.242.. .
Rodger wrote on 15 aug 2008 in microsoft.publi c.inetserver.as p.general:

I am looking to re-work my main page and have been using include
statements on it and I now want to add another section, but this time
my include is ASP. If I pull the ASP up by itself it works just fine.
How ever when I have it in my default.htm page the ASP does not
execute so when I look at the source I see all the ASP Code. any idea
what I need to set?

Here is the code in my main page for the include.

<P align=CENTER style="FONT-FAMILY: Tahoma"><!--#include
file="public/nursing.htm"--></P><hr />

<!--#include file="public/MENU.asp"--></td>

MENU.asp - works if I type it in the address bar, but when I have it
in my include it does not work.

MENU.asp is not executed as an asp page,
but,
and that is what include is supposed to do,
the source is just inserted as a text string.
so,
if the mail page is main.htm, there is no ASP rendering.

Read up on ASP include specs.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Aug 15 '08 #3

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

Similar topics

11
2999
by: Yannick Turgeon | last post by:
Oups! I did a typing error in my last post. Fixed. ----------- Hello all, We are currently changing our web server and, in the process, updating PHP version from 4.3.0 to 4.3.5. The problem we've got is that our way to include some files in other ones is no more working properly. The message we are getting looks like: "PHP Warning: main(..\db.inc.php): failed to open stream: No such file or directory in ..."
2
1956
by: Mike | last post by:
I don't completely understand the documentation for the include() function: "Files for including are first looked in include_path relative to the current working directory and then in include_path relative to the directory of current script. E.g. if your include_path is ., current working directory is /www/, you included include/a.php and there is include "b.php" in that file, b.php is first looked in /www/ and then in /www/include/. " ...
5
6097
by: Danny Anderson | last post by:
Hola! I am working on a program where I am including a library that came with my numerical methods textbook. The "util.h" simply includes a large number of files. I had to change the util.h slightly to adjust path names and also take into account I am working with a case-sensitive OS. My program is below. The sticky point is that adding (#include "util.h") seems to negate the (#include <string>) statement somehow. How can I get...
5
2512
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...
2
4641
by: WisTex | last post by:
I've come across a very weird problem. Virtual includes work on all my ASP pages on the entire website, including those in subdirectories, yet they won't work on a particular page I created, even though the virtual include statement is copy & pasted exactly as it appears on the working pages. What would cause virtual includes to work in one page on a website, but not on another? Error Message: Microsoft VBScript runtime error...
6
2788
by: +86 | last post by:
i encountered this problem: "include('inc.php')" will work problely but "include('./inc.php') doesn't work .. both file_exists('inc.php') or file_exists('./inc.php') didn't return the right value.this always show "file doesn't exists' my environment is win2003+iis+php5 how to fix it ?
8
2146
by: The Cool Giraffe | last post by:
One thing i do know for sure. When one creates a CPP file, one needs to include the H file. Now, having said that, i wonder if there are some general hints, requirements or standard guide lines on what and how to include. Suppose that we have a project consisting of a number of classes and structs. Some of them using the others, some using all of them. What is a good approach when including? --
11
26643
by: cybervigilante | last post by:
I can't seem to change the include path on my local winmachine no matter what I do. It comes up as includ_path .;C:\php5\pear in phpinfo() but there is no such file. I installed the WAMP package and PEAR is in c:\wamp\php\pear I modified php.ini in the c:\wamp\php directory to reflect the actual path, but even stopping and restarting my server shows the c: \php5\pear path. I can't change it no matter what I do I also tried the...
3
1336
by: benoypaul | last post by:
I am using an include file in my php program. This include file is not working with php program file ,but it is working with browser(http://yoga.womans-health.net/Includes/NewsFeed.php?CAT=About+Yoga). Code is given below include 'http://yoga.womans-halth.net/Includes/NewsFeed.php?CAT=About+Yoga'; your help is greatly appreciated.. thanks
10
1952
by: Raheem | last post by:
Hello, I built a development version of a live website on my hosted account. However the development version is having problems with finding include files. After troubleshooting I was able to resolve the issue by removing the ../ from the beginning of the include file path. But now I am looking at making this modification hundreds of times in all kinds of files. I'd like to keep the dev env similar to the live env so I can port changes...
0
9685
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
9535
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
10465
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
10242
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...
0
10021
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9061
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7558
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
5453
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...
2
3744
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.