ASP Include is not working.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Rodger

    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

  • Evertjan.

    #2
    Re: ASP Include is not working.

    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)

    Comment

    • Rodger

      #3
      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.hannivoo rt@interxnl.net wrote in message
      news:Xns9AFBA9E AE35F2eejj99@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)

      Comment

      Working...