PC Review Forums Newsgroups Microsoft Word Microsoft Frontpage ASP Include page not working

Reply

ASP Include page not working

 
Thread Tools Rate Thread
Old 06-10-2005, 01:10 AM   #1
=?Utf-8?B?TXIuIEFuYWxvZ3k=?=
Guest
 
Posts: n/a
Default ASP Include page not working


Hi,

I'm trying to modularize some of my .asp scripts. So, I'd like to replace
recurring vbscript in my .asp pages with server side includes.

However, I can't get them to work. I created a simple test page (see below)
and it doesn't work. The ASP page containing the #include doesn't show any
text from teh include. However, when I view the include page (include.asp)
directly, I do see the response.write text it should be displaying.

Any suggestions? I'm baffled.



I have two files in the same directory
(http://www.BungalowSoftware.com/testdirectory/)
-include.asp
-test2.asp

include.asp
<%
Response.Write "Hello World"
%>

test2.asp
<%@ LANGUAGE="VBSCRIPT" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<body>
start test... <p> <% response.write "generated from asp on this page " %>
<p> end test</p>

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

</body>

</html>
  Reply With Quote
Old 06-10-2005, 01:44 AM   #2
Chris Leeds, MVP-FrontPage
Guest
 
Posts: n/a
Default Re: ASP Include page not working

see if you just put "hello world" on the include page with out the asp
delimiters and the response.write statement if it shows up.

that'll at least point you in a direction.

--
Chris Leeds,
Microsoft MVP-FrontPage

ContentSeed: great tool for web masters,
a fantastic convenience for site owners.
http://contentseed.com/
--
"Mr. Analogy" <MrAnalogy@discussions.microsoft.com> wrote in message
news:76D57714-64A2-454F-ABA2-07884ABFFB86@microsoft.com...
> Hi,
>
> I'm trying to modularize some of my .asp scripts. So, I'd like to replace
> recurring vbscript in my .asp pages with server side includes.
>
> However, I can't get them to work. I created a simple test page (see

below)
> and it doesn't work. The ASP page containing the #include doesn't show any
> text from teh include. However, when I view the include page

(include.asp)
> directly, I do see the response.write text it should be displaying.
>
> Any suggestions? I'm baffled.
>
>
>
> I have two files in the same directory
> (http://www.BungalowSoftware.com/testdirectory/)
> -include.asp
> -test2.asp
>
> include.asp
> <%
> Response.Write "Hello World"
> %>
>
> test2.asp
> <%@ LANGUAGE="VBSCRIPT" %>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd">
> <html>
> <head>
> <body>
> start test... <p> <% response.write "generated from asp on this page " %>
> <p> end test</p>
>
> <!-- #include file="include.asp" -->
>
> </body>
>
> </html>



  Reply With Quote
Old 06-10-2005, 04:16 AM   #3
p c
Guest
 
Posts: n/a
Default Re: ASP Include page not working

Try the include directive w/o spaces next to --

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

...PC

Mr. Analogy wrote:

> Hi,
>
> I'm trying to modularize some of my .asp scripts. So, I'd like to replace
> recurring vbscript in my .asp pages with server side includes.
>
> However, I can't get them to work. I created a simple test page (see below)
> and it doesn't work. The ASP page containing the #include doesn't show any
> text from teh include. However, when I view the include page (include.asp)
> directly, I do see the response.write text it should be displaying.
>
> Any suggestions? I'm baffled.
>
>
>
> I have two files in the same directory
> (http://www.BungalowSoftware.com/testdirectory/)
> -include.asp
> -test2.asp
>
> include.asp
> <%
> Response.Write "Hello World"
> %>
>
> test2.asp
> <%@ LANGUAGE="VBSCRIPT" %>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd">
> <html>
> <head>
> <body>
> start test... <p> <% response.write "generated from asp on this page " %>
> <p> end test</p>
>
> <!-- #include file="include.asp" -->
>
> </body>
>
> </html>

  Reply With Quote
Old 06-10-2005, 09:30 AM   #4
Stefan B Rusynko
Guest
 
Posts: n/a
Default Re: ASP Include page not working

Then it is not a valid ASP page or script
- the script delimiters are required around any VBscript
- Unless you mean to test it using only html on the include page as in making include.asp content just
<P>Hello World</P>

The include in test2.asp (for a file named include.asp in the same folder as test2.asp) should be

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

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp
_____________________________________________


"Chris Leeds, MVP-FrontPage" <Leeds@mvps.org> wrote in message news:eVPVAehyFHA.3812@TK2MSFTNGP09.phx.gbl...
| see if you just put "hello world" on the include page with out the asp
| delimiters and the response.write statement if it shows up.
|
| that'll at least point you in a direction.
|
| --
| Chris Leeds,
| Microsoft MVP-FrontPage
|
| ContentSeed: great tool for web masters,
| a fantastic convenience for site owners.
| http://contentseed.com/
| --
| "Mr. Analogy" <MrAnalogy@discussions.microsoft.com> wrote in message
| news:76D57714-64A2-454F-ABA2-07884ABFFB86@microsoft.com...
| > Hi,
| >
| > I'm trying to modularize some of my .asp scripts. So, I'd like to replace
| > recurring vbscript in my .asp pages with server side includes.
| >
| > However, I can't get them to work. I created a simple test page (see
| below)
| > and it doesn't work. The ASP page containing the #include doesn't show any
| > text from teh include. However, when I view the include page
| (include.asp)
| > directly, I do see the response.write text it should be displaying.
| >
| > Any suggestions? I'm baffled.
| >
| >
| >
| > I have two files in the same directory
| > (http://www.BungalowSoftware.com/testdirectory/)
| > -include.asp
| > -test2.asp
| >
| > include.asp
| > <%
| > Response.Write "Hello World"
| > %>
| >
| > test2.asp
| > <%@ LANGUAGE="VBSCRIPT" %>
| > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
| > "http://www.w3.org/TR/html4/loose.dtd">
| > <html>
| > <head>
| > <body>
| > start test... <p> <% response.write "generated from asp on this page " %>
| > <p> end test</p>
| >
| > <!-- #include file="include.asp" -->
| >
| > </body>
| >
| > </html>
|
|


  Reply With Quote
Old 06-10-2005, 12:33 PM   #5
Chris Leeds, MVP-FrontPage
Guest
 
Posts: n/a
Default Re: ASP Include page not working

yah, that's what I meant, just have text on the file _getting_ included.
that way he can easily see if anything will come in via the SSI and point
him in a direction for a remedy.

--
Chris Leeds,
Microsoft MVP-FrontPage

ContentSeed: great tool for web masters,
a fantastic convenience for site owners.
http://contentseed.com/
--
"Stefan B Rusynko" <sbr_enjoy@hotmail.com> wrote in message
news:e#Y5ghlyFHA.3812@TK2MSFTNGP09.phx.gbl...
> Then it is not a valid ASP page or script
> - the script delimiters are required around any VBscript
> - Unless you mean to test it using only html on the include page as in

making include.asp content just
> <P>Hello World</P>
>
> The include in test2.asp (for a file named include.asp in the same folder

as test2.asp) should be
>
> <!--- #include file = "include.asp" --->
>
> --
>
> _____________________________________________
> SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
> "Warning - Using the F1 Key will not break anything!" (-;
> To find the best Newsgroup for FrontPage support see:
> http://www.net-sites.com/sitebuilder/newsgroups.asp
> _____________________________________________
>
>
> "Chris Leeds, MVP-FrontPage" <Leeds@mvps.org> wrote in message

news:eVPVAehyFHA.3812@TK2MSFTNGP09.phx.gbl...
> | see if you just put "hello world" on the include page with out the asp
> | delimiters and the response.write statement if it shows up.
> |
> | that'll at least point you in a direction.
> |
> | --
> | Chris Leeds,
> | Microsoft MVP-FrontPage
> |
> | ContentSeed: great tool for web masters,
> | a fantastic convenience for site owners.
> | http://contentseed.com/
> | --
> | "Mr. Analogy" <MrAnalogy@discussions.microsoft.com> wrote in message
> | news:76D57714-64A2-454F-ABA2-07884ABFFB86@microsoft.com...
> | > Hi,
> | >
> | > I'm trying to modularize some of my .asp scripts. So, I'd like to

replace
> | > recurring vbscript in my .asp pages with server side includes.
> | >
> | > However, I can't get them to work. I created a simple test page (see
> | below)
> | > and it doesn't work. The ASP page containing the #include doesn't show

any
> | > text from teh include. However, when I view the include page
> | (include.asp)
> | > directly, I do see the response.write text it should be displaying.
> | >
> | > Any suggestions? I'm baffled.
> | >
> | >
> | >
> | > I have two files in the same directory
> | > (http://www.BungalowSoftware.com/testdirectory/)
> | > -include.asp
> | > -test2.asp
> | >
> | > include.asp
> | > <%
> | > Response.Write "Hello World"
> | > %>
> | >
> | > test2.asp
> | > <%@ LANGUAGE="VBSCRIPT" %>
> | > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> | > "http://www.w3.org/TR/html4/loose.dtd">
> | > <html>
> | > <head>
> | > <body>
> | > start test... <p> <% response.write "generated from asp on this page

" %>
> | > <p> end test</p>
> | >
> | > <!-- #include file="include.asp" -->
> | >
> | > </body>
> | >
> | > </html>
> |
> |
>
>



  Reply With Quote
Old 06-10-2005, 02:08 PM   #6
=?Utf-8?B?TXIuIEFuYWxvZ3k=?=
Guest
 
Posts: n/a
Default Re: ASP Include page not working

Changed incl page to be just text and that text doesn't show up. So incl page
not getting included.


test2 and include are in the same sub directory. Any ideas why it's not
incliuding the file?


Do i need some special code in the ,asp page to enable ssi?
Something special on the server side?



-clay

"Chris Leeds, MVP-FrontPage" wrote:

> yah, that's what I meant, just have text on the file _getting_ included.
> that way he can easily see if anything will come in via the SSI and point
> him in a direction for a remedy.
>
> --
> Chris Leeds,
> Microsoft MVP-FrontPage
>
> ContentSeed: great tool for web masters,
> a fantastic convenience for site owners.
> http://contentseed.com/
> --
> "Stefan B Rusynko" <sbr_enjoy@hotmail.com> wrote in message
> news:e#Y5ghlyFHA.3812@TK2MSFTNGP09.phx.gbl...
> > Then it is not a valid ASP page or script
> > - the script delimiters are required around any VBscript
> > - Unless you mean to test it using only html on the include page as in

> making include.asp content just
> > <P>Hello World</P>
> >
> > The include in test2.asp (for a file named include.asp in the same folder

> as test2.asp) should be
> >
> > <!--- #include file = "include.asp" --->
> >
> > --
> >
> > _____________________________________________
> > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
> > "Warning - Using the F1 Key will not break anything!" (-;
> > To find the best Newsgroup for FrontPage support see:
> > http://www.net-sites.com/sitebuilder/newsgroups.asp
> > _____________________________________________
> >
> >
> > "Chris Leeds, MVP-FrontPage" <Leeds@mvps.org> wrote in message

> news:eVPVAehyFHA.3812@TK2MSFTNGP09.phx.gbl...
> > | see if you just put "hello world" on the include page with out the asp
> > | delimiters and the response.write statement if it shows up.
> > |
> > | that'll at least point you in a direction.
> > |
> > | --
> > | Chris Leeds,
> > | Microsoft MVP-FrontPage
> > |
> > | ContentSeed: great tool for web masters,
> > | a fantastic convenience for site owners.
> > | http://contentseed.com/
> > | --
> > | "Mr. Analogy" <MrAnalogy@discussions.microsoft.com> wrote in message
> > | news:76D57714-64A2-454F-ABA2-07884ABFFB86@microsoft.com...
> > | > Hi,
> > | >
> > | > I'm trying to modularize some of my .asp scripts. So, I'd like to

> replace
> > | > recurring vbscript in my .asp pages with server side includes.
> > | >
> > | > However, I can't get them to work. I created a simple test page (see
> > | below)
> > | > and it doesn't work. The ASP page containing the #include doesn't show

> any
> > | > text from teh include. However, when I view the include page
> > | (include.asp)
> > | > directly, I do see the response.write text it should be displaying.
> > | >
> > | > Any suggestions? I'm baffled.
> > | >
> > | >
> > | >
> > | > I have two files in the same directory
> > | > (http://www.BungalowSoftware.com/testdirectory/)
> > | > -include.asp
> > | > -test2.asp
> > | >
> > | > include.asp
> > | > <%
> > | > Response.Write "Hello World"
> > | > %>
> > | >
> > | > test2.asp
> > | > <%@ LANGUAGE="VBSCRIPT" %>
> > | > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> > | > "http://www.w3.org/TR/html4/loose.dtd">
> > | > <html>
> > | > <head>
> > | > <body>
> > | > start test... <p> <% response.write "generated from asp on this page

> " %>
> > | > <p> end test</p>
> > | >
> > | > <!-- #include file="include.asp" -->
> > | >
> > | > </body>
> > | >
> > | > </html>
> > |
> > |
> >
> >

>
>
>

  Reply With Quote
Old 06-10-2005, 02:32 PM   #7
Thomas A. Rowe
Guest
 
Posts: n/a
Default Re: ASP Include page not working

Does your web host allow you to use SSI?

What OS is running on the server?

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

"Mr. Analogy" <MrAnalogy@discussions.microsoft.com> wrote in message
news:741984DD-1483-4506-979C-4EAF1FCCB0CD@microsoft.com...
> Changed incl page to be just text and that text doesn't show up. So incl page
> not getting included.
>
>
> test2 and include are in the same sub directory. Any ideas why it's not
> incliuding the file?
>
>
> Do i need some special code in the ,asp page to enable ssi?
> Something special on the server side?
>
>
>
> -clay
>
> "Chris Leeds, MVP-FrontPage" wrote:
>
>> yah, that's what I meant, just have text on the file _getting_ included.
>> that way he can easily see if anything will come in via the SSI and point
>> him in a direction for a remedy.
>>
>> --
>> Chris Leeds,
>> Microsoft MVP-FrontPage
>>
>> ContentSeed: great tool for web masters,
>> a fantastic convenience for site owners.
>> http://contentseed.com/
>> --
>> "Stefan B Rusynko" <sbr_enjoy@hotmail.com> wrote in message
>> news:e#Y5ghlyFHA.3812@TK2MSFTNGP09.phx.gbl...
>> > Then it is not a valid ASP page or script
>> > - the script delimiters are required around any VBscript
>> > - Unless you mean to test it using only html on the include page as in

>> making include.asp content just
>> > <P>Hello World</P>
>> >
>> > The include in test2.asp (for a file named include.asp in the same folder

>> as test2.asp) should be
>> >
>> > <!--- #include file = "include.asp" --->
>> >
>> > --
>> >
>> > _____________________________________________
>> > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
>> > "Warning - Using the F1 Key will not break anything!" (-;
>> > To find the best Newsgroup for FrontPage support see:
>> > http://www.net-sites.com/sitebuilder/newsgroups.asp
>> > _____________________________________________
>> >
>> >
>> > "Chris Leeds, MVP-FrontPage" <Leeds@mvps.org> wrote in message

>> news:eVPVAehyFHA.3812@TK2MSFTNGP09.phx.gbl...
>> > | see if you just put "hello world" on the include page with out the asp
>> > | delimiters and the response.write statement if it shows up.
>> > |
>> > | that'll at least point you in a direction.
>> > |
>> > | --
>> > | Chris Leeds,
>> > | Microsoft MVP-FrontPage
>> > |
>> > | ContentSeed: great tool for web masters,
>> > | a fantastic convenience for site owners.
>> > | http://contentseed.com/
>> > | --
>> > | "Mr. Analogy" <MrAnalogy@discussions.microsoft.com> wrote in message
>> > | news:76D57714-64A2-454F-ABA2-07884ABFFB86@microsoft.com...
>> > | > Hi,
>> > | >
>> > | > I'm trying to modularize some of my .asp scripts. So, I'd like to

>> replace
>> > | > recurring vbscript in my .asp pages with server side includes.
>> > | >
>> > | > However, I can't get them to work. I created a simple test page (see
>> > | below)
>> > | > and it doesn't work. The ASP page containing the #include doesn't show

>> any
>> > | > text from teh include. However, when I view the include page
>> > | (include.asp)
>> > | > directly, I do see the response.write text it should be displaying.
>> > | >
>> > | > Any suggestions? I'm baffled.
>> > | >
>> > | >
>> > | >
>> > | > I have two files in the same directory
>> > | > (http://www.BungalowSoftware.com/testdirectory/)
>> > | > -include.asp
>> > | > -test2.asp
>> > | >
>> > | > include.asp
>> > | > <%
>> > | > Response.Write "Hello World"
>> > | > %>
>> > | >
>> > | > test2.asp
>> > | > <%@ LANGUAGE="VBSCRIPT" %>
>> > | > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
>> > | > "http://www.w3.org/TR/html4/loose.dtd">
>> > | > <html>
>> > | > <head>
>> > | > <body>
>> > | > start test... <p> <% response.write "generated from asp on this page

>> " %>
>> > | > <p> end test</p>
>> > | >
>> > | > <!-- #include file="include.asp" -->
>> > | >
>> > | > </body>
>> > | >
>> > | > </html>
>> > |
>> > |
>> >
>> >

>>
>>
>>



  Reply With Quote
Old 06-10-2005, 02:58 PM   #8
=?Utf-8?B?TXIuIEFuYWxvZ3k=?=
Guest
 
Posts: n/a
Default solved

will b brief. hurt arm ystrdy.

1. SSI was not turned on at server
2. FP2003 set to not publsh comments.#include looks like comment,

Thns 4 help
  Reply With Quote
Old 06-10-2005, 03:03 PM   #9
Chris Leeds, MVP-FrontPage
Guest
 
Posts: n/a
Default Re: solved

ooh, a two part problem.
Glad you got it fixed. along that same line watch out also for "parent path
not enabled" when your include is to a directory above the pages location.

HTH

--
Chris Leeds,
Microsoft MVP-FrontPage

ContentSeed: great tool for web masters,
a fantastic convenience for site owners.
http://contentseed.com/
--
"Mr. Analogy" <MrAnalogy@discussions.microsoft.com> wrote in message
news:0C0EB750-5730-47D9-87A7-A06D4CB9BE97@microsoft.com...
> will b brief. hurt arm ystrdy.
>
> 1. SSI was not turned on at server
> 2. FP2003 set to not publsh comments.#include looks like comment,
>
> Thns 4 help



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off