HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
Calling an ASP Page from within an Include
Post new topic   Reply to topic    HTML Help Forum Index -> ASP
View previous topic :: View next topic  
Author Message
Tashira



Joined: 07 Aug 2007
Posts: 4

PostPosted: Tue Aug 07, 2007 1:02 am     Calling an ASP Page from within an Include Reply with quote

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
Site Admin


Joined: 15 May 2004
Posts: 8267
Location: Castle Rock CO USA

PostPosted: Tue Aug 07, 2007 2:26 am     Reply with quote



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

PostPosted: Tue Aug 07, 2007 3:05 am     Reply with quote

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 Confused

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
Site Admin


Joined: 15 May 2004
Posts: 8267
Location: Castle Rock CO USA

PostPosted: Tue Aug 07, 2007 3:20 am     Reply with quote

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

PostPosted: Tue Aug 07, 2007 3:36 am     Reply with quote

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
Site Admin


Joined: 15 May 2004
Posts: 8267
Location: Castle Rock CO USA

PostPosted: Tue Aug 07, 2007 9:20 am     Reply with quote

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

PostPosted: Tue Aug 07, 2007 12:49 pm     Reply with quote

Hi Corey

I was being blonde Embarassed

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 Very Happy

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 Mad

Anyway, Thanks again for your patience
Tash
Corey Bryant
Site Admin


Joined: 15 May 2004
Posts: 8267
Location: Castle Rock CO USA

PostPosted: Tue Aug 07, 2007 1:35 pm     Reply with quote

No problem - good luck with the site!

_________________
Corey
Toll Free Fax Numbers | Mile High Merchant Accounts
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> ASP All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial