HTML Help Forum HTML Help
Please Search for the answer to your question before asking it! Thanks.
 

Calling an ASP Page from within an Include
Post a Reply to this Topic Ask a New Question
Click here to go to the original topic
       HTML Help Forum -> ASP
View previous topic :: View next topic  
Author Message
Tashira



Joined: 07 Aug 2007
Posts: 4

Posted: Tue Aug 07, 2007 1:02 am     Calling an ASP Page from within an Include  

I don't know if this can even be done, but it is driving me mad and I hope someone can point me in the right direction.

Here is the scenario:

I have an index.asp that calls an include of addbody.asp - that works fine, however, I need to call another asp file (cap.asp) from within the addbody.asp.

This doesn't appear to work...if I put the cap.asp as an include in either of the other asp files it runs but that asp is all you see.

I have run addbody.asp as a separate file and the cap.asp file works perfectly then - it just doesn't seem to like being called when it is within an include file.

Is there any way round this - can any one help - this has been driving me insane!!!

Thanking everyone in advance
Tash


Corey Bryant



Joined: 15 May 2004
Posts: 8748
Location: Castle Pines North, CO USA

Posted: Tue Aug 07, 2007 2:26 am      

Check the path. On inlcuded content and there is this code Code: <!--#include file="includes/nav.html" --> which you are probably using. But you might be needing to call it virtually: Code: <!--#include virtual="/includes/nav.html" --> And this will push the path back to the root.

_________________
Corey
Toll Free Fax Numbers | Merchant Accounts | Microsoft Expressions
Tashira



Joined: 07 Aug 2007
Posts: 4

Posted: Tue Aug 07, 2007 3:05 am      

Hi Corey

Thanks for your reply:)

I added it to the addbody.asp but it seems to do the same as just including it normally - instead of me getting the page of addbody.asp on show with the result that is in cap.asp showing (which is what I want), I just get the result of cap.asp showing (which is an image). I'm not sure if I have explained it well :?

It should be:
Index.asp displays the include of addbody.asp with cap.asp (the image) being shown within addbody.asp

What I get is: (when including in addbody.asp)
Index.asp displays cap.asp image only.

If I don't use an include for cap.asp and just call it from within addbody.asp, all I get is a red cross in an image placement not the image itself.

I hope I have explained it properly - please excuse me!

Thank you
Tash
Corey Bryant



Joined: 15 May 2004
Posts: 8748
Location: Castle Pines North, CO USA

Posted: Tue Aug 07, 2007 3:20 am      

So an image placement - you can right click on the image and see what path it thinks it is calling that image from and fix it easily.

_________________
Corey
Toll Free Numbers | SiteMaps for Search Engines
Tashira



Joined: 07 Aug 2007
Posts: 4

Posted: Tue Aug 07, 2007 3:36 am      

Hi Corey,

It thinks this is its image..

<img src="cap.asp" alt="This Is cap Image" />

Does this help?

Thanks alot
Tash
Corey Bryant



Joined: 15 May 2004
Posts: 8748
Location: Castle Pines North, CO USA

Posted: Tue Aug 07, 2007 9:20 am      

What's in the cap.asp file?

The cap.asp is in the same folder as the file that is calling it as well.

_________________
Corey
Toll Free Fax Numbers | Merchant Accounts | Microsoft Expressions
Tashira



Joined: 07 Aug 2007
Posts: 4

Posted: Tue Aug 07, 2007 12:49 pm      

Hi Corey

I was being blonde :oops:

I didn't realise what you meant when you said "you can right click on the image and see what path it thinks it is calling that image from and fix it easily"

I thought you meant view the source - my husband just pointed out that you were talking about the properties! DOH!!

You were right - the path was wrong - I had forgotten the include path! The correct path has been entered and it works now :D

Thank you for your help - I can't believe that it turned out to be such a silly mistake - especially after all the time I had spent looking at it :x

Anyway, Thanks again for your patience
Tash
Corey Bryant



Joined: 15 May 2004
Posts: 8748
Location: Castle Pines North, CO USA

Posted: Tue Aug 07, 2007 1:35 pm      

No problem - good luck with the site!

_________________
Corey
Toll Free Fax Numbers | Mile High Merchant Accounts
 
 
DARFUR
HOSTING / DESIGN
MAKE MONEY

       HTML Help Forum -> ASP
Page 1 of 1


Powered by phpBB Search Engine Indexer
Powered by phpBB 2.0.19 © 2001, 2002 phpBB Group