PC Review
Forums
Newsgroups
Microsoft Word
Microsoft Frontpage
ASP Include page not working
Forums
Newsgroups
Microsoft Word
Microsoft Frontpage
ASP Include page not working
![]() |
ASP Include page not working |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
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> |
|
|
|
#2 |
|
Guest
Posts: n/a
|
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> |
|
|
|
#3 |
|
Guest
Posts: n/a
|
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> |
|
|
|
#4 |
|
Guest
Posts: n/a
|
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> | | |
|
|
|
#5 |
|
Guest
Posts: n/a
|
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> > | > | > > |
|
|
|
#6 |
|
Guest
Posts: n/a
|
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> > > | > > | > > > > > > > |
|
|
|
#7 |
|
Guest
Posts: n/a
|
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> >> > | >> > | >> > >> > >> >> >> |
|
|
|
#8 |
|
Guest
Posts: n/a
|
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 |
|
|
|
#9 |
|
Guest
Posts: n/a
|
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 |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

