ASP Help, please!!!! (real simple)

Blieb

Diamond Member
Apr 17, 2000
3,475
0
76
How can I do an offsite include?

Instead of:
<!--#include file ='topmenu.asp'-->

Something like:
<!--#include file ='http://www.mydom.com/topmenu.asp'-->

I realize that the above does not work, but you know what I mean ...

Any ideas?

ASP, not .NET
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
All ASP script commands are processed on the server and only the results are sent to the client (embedded HTML + any response object output). The designers of the ASP language apparently didn't think it was very useful to have the server making a connection to another server before being able to process a page.

If you do need to pull data (but not script code) from a second server, there are server-side ASP components for having the server make an HTTP connection to another server
(Software Artisans? Go to innerhost.com and look at their ASP components list.)
 

Descartes

Lifer
Oct 10, 1999
13,968
2
0
The designers of the ASP language apparently didn't think it was very useful to have the server making a connection to another server before being able to process a page.

Uhh, you expect to be able to consume the work of another random host? Let me see...

<!--#include file="http://www.microsoft.com/include/core.asp" -->

Gee, thanks MS! Yah, that was obviously a good decision; not a flaw.

If you do need to pull data (but not script code) from a second server, there are server-side ASP components for having the server make an HTTP connection to another server
(Software Artisans? Go to innerhost.com and look at their ASP components list.)

XMLHTTP, part of the XML SDK. ASPTear is also good, and it's free.
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
Originally posted by: Descartes
The designers of the ASP language apparently didn't think it was very useful to have the server making a connection to another server before being able to process a page.

Uhh, you expect to be able to consume the work of another random host? Let me see...

<!--#include file="http://www.microsoft.com/include/core.asp" -->

Gee, thanks MS! Yah, that was obviously a good decision; not a flaw.

If you do need to pull data (but not script code) from a second server, there are server-side ASP components for having the server make an HTTP connection to another server
(Software Artisans? Go to innerhost.com and look at their ASP components list.)

XMLHTTP, part of the XML SDK. ASPTear is also good, and it's free.
By "apprently" I meant that I'm making an assumption, not that I disagree with the designers. It would almost always be a poor design to use such a feature even if it existed, but it might be ok in some low-traffic LAN setting to synchronize multiple servers I suppose.

I was thinking of ServerObjects AspHTTP which we've used at work, but it's not free (good job on the links).
 

Blieb

Diamond Member
Apr 17, 2000
3,475
0
76
I ended up just making a generic layout and used that.

Not a host scam :|

There's a legitimate reason.

This client has some type of intranet and they're going to allow connections from the outside to use some custom software they're putting in this weekend. They want the "look and feel" of their website on this software ... BUT, the stuff isn't on the site. I could have given them just the code and some images, but I wanted to reserve that for last resort, since sometimes they do nav changes, which would make the layouts NOT the same ...

Thank you for your help! I'll run it by the guy if the generic thing isn't enough ...