Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old August 15th, 2008, 03:35 PM
Rodger
Guest
 
Posts: n/a
Default 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

  #2  
Old August 15th, 2008, 03:45 PM
Evertjan.
Guest
 
Posts: n/a
Default Re: ASP Include is not working.

Rodger wrote on 15 aug 2008 in microsoft.public.inetserver.asp.general:
Quote:
>
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)
  #3  
Old August 15th, 2008, 04:15 PM
Rodger
Guest
 
Posts: n/a
Default Re: ASP Include is not working.

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." <exjxw.hannivoort@interxnl.netwrote in message
news:Xns9AFBA9EAE35F2eejj99@194.109.133.242...
Quote:
Rodger wrote on 15 aug 2008 in microsoft.public.inetserver.asp.general:
>
Quote:

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)

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles