473,396 Members | 2,038 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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=VBScript %>

<% Option Explicit %>

<% Response.Buffer = true %>

<%

Dim conn, rs, rs2, mySQL, mySQL2, dbPath, myDate
Set Conn = Server.CreateObject("ADODB.Connection")

conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\intranet\protected\bethesda.mdb" ';User Id=admin;Password="

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

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

set rs = conn.Execute(mySQL)
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.write FormatDateTime(myDate,1)%><br />

Dinnig Room Menu<BR /><BR />

Starters<BR />

<span style=color=<%=rs("MEN_SOUP1_COLOR")%>><%=rs("MEN_ SOUP1")%></span>

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

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

<span style=color=<%=rs("MEN_SOUP2_COLOR")%>><%=rs("MEN_ SOUP2")%></span>

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

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

Entrees<br />

<span style=color=<%=rs("MEN_ENTREE1_COLOR")%>><%=rs("ME N_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")%>><%=rs("ME N_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")%>><%=rs("ME N_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_COLOR")%>><%=rs("MEN_V EG1")%></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_COLOR")%>><%=rs("MEN_V EG2")%></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_COLOR")%>><%=rs("MEN_V EG3")%></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_COLOR")%>><%=rs("MEN_V EG4")%></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")%>><%=rs("ME N_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_COLOR")%>><%=rs("MEN_ GRILL")%></span>

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

<% if rs("MEN_GRILL_HC") = "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 4278
Rodger wrote on 15 aug 2008 in microsoft.public.inetserver.asp.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.netwrote in message
news:Xn********************@194.109.133.242...
Rodger wrote on 15 aug 2008 in microsoft.public.inetserver.asp.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
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...
2
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...
5
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...
5
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...
2
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...
6
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...
8
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...
11
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...
3
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 ...
10
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
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,...
0
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...
0
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...

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.