473,386 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

FSO or XMLHTTP

One of the limitations of ASP is the lack of a dynamic SSI, in which you can
include files using variables. So far I know only of two methods to go
around that.

1. to use the File System Object
2. to use the XMLHTTP Object

Which one of the two is less of a burden for IIS ? Or are there other ways
that are much better? Thanks in advance.
Jul 22 '05 #1
9 1467
What about server.execute? Is that an option for you?

Ray at work

"Pietro" <pe******@nowhere.com> wrote in message
news:o7********************@news20.bellglobal.com. ..
One of the limitations of ASP is the lack of a dynamic SSI, in which you can include files using variables. So far I know only of two methods to go
around that.

1. to use the File System Object
2. to use the XMLHTTP Object

Which one of the two is less of a burden for IIS ? Or are there other ways
that are much better? Thanks in advance.

Jul 22 '05 #2
Yes, there is another one: you can use the old Scriptlet technology which
gives you the possibility of transforming into a COM component a piece of
Javascript/VBScript or an ASP page. See for example:
http://msdn.microsoft.com/library/de...ting091399.asp .

The whole site at Renaud-Bray has been designed this way: each displayed
page is in fact an association of multiples scriptlets and the list, order
and place of these scriptlets are stored in a database and can be changed at
will (or even be drawn at random). However, this is now an old and obsolote
technology and I don't think that you will find much information about it
(or about ASP) on the internet. You can try searching for key words like
SCRIPTLET and WSH.

--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: http://cerbermail.com/?QugbLEWINF
"Pietro" <pe******@nowhere.com> wrote in message
news:o7********************@news20.bellglobal.com. ..
One of the limitations of ASP is the lack of a dynamic SSI, in which you
can
include files using variables. So far I know only of two methods to go
around that.

1. to use the File System Object
2. to use the XMLHTTP Object

Which one of the two is less of a burden for IIS ? Or are there other ways
that are much better? Thanks in advance.

Jul 22 '05 #3
"Ray Costanzo [MVP]" wrote :
What about server.execute? Is that an option for you?


YES! How did I miss that feature? Shame on me ...

Jul 22 '05 #4
I read somewhere:

" Another potential drawback with Server.Execute is that any page-scope
variables are not shared between the original page and the executed page. "

Does that mean that variables declared (with Dim ...etc) in the "mother"
page are not passed to the "included" one?? That'd might be a problem.
Jul 22 '05 #5
Yes, that is what it means, and it does kinda suck...

Dim x
x = 3
Server.Execute "somepage.asp"

-----
somepage.asp:

Option Explicit
Response.WRite x

-----
result:

Variable not declared 'x'
You can kinda do conditional includes. You can do:

Dim x
x = 3
Select Case x
Case 1 %>
<!-- #include file="file1.asp" -->
<% Case 2 %>
<!-- #include file="file2.asp" -->
<% Case 3 %>
<!-- #include file="file3.asp" -->
<% Case Else %>
<!-- #include file="else.asp" -->
<%
End Select
'...
%>

But, with that, all of your files are actually included. It's just that the
code only in one of them will be executed.

Ray at work

"Pietro" <pe******@nowhere.com> wrote in message
news:r%*********************@news20.bellglobal.com ...
I read somewhere:

" Another potential drawback with Server.Execute is that any page-scope
variables are not shared between the original page and the executed page. "
Does that mean that variables declared (with Dim ...etc) in the "mother"
page are not passed to the "included" one?? That'd might be a problem.

Jul 22 '05 #6
That's all very limiting. I tried passing variables to the page called with
server.execute in a querystring, and got an error when loading the parent
page.

" Invalid URL form or fully-qualified absolute URL was used. Use relative
URLs. "

Oh, well.
Jul 22 '05 #7
I also noticed that variables created in the child page are not accepted by
the parent. I am back at square one. What is less resource consuming (for
IIS) ?
FSO or XMLHTTP ?

I know that the former will return text/html processed by whatever server
delivers the file, but what about FSO, when the file has ASP code? Will the
script run and the text/html output returned?
Jul 22 '05 #8
FSO will return the raw ASP script text. XMLHTTP will return the output of
the ASP page as if it were loaded from the web-server into a browser.

If you give more details about what you are trying to do someone may be able
to suggest a different approach.

--
Mark Schupp

"Pietro" <pe******@nowhere.com> wrote in message
news:fN********************@news20.bellglobal.com. ..
I also noticed that variables created in the child page are not accepted by the parent. I am back at square one. What is less resource consuming (for
IIS) ?
FSO or XMLHTTP ?

I know that the former will return text/html processed by whatever server
delivers the file, but what about FSO, when the file has ASP code? Will the script run and the text/html output returned?

Jul 22 '05 #9
"Pietro" <pe******@nowhere.com> wrote in message
news:6y********************@news20.bellglobal.com. ..
That's all very limiting. I tried passing variables to the page called
with
server.execute in a querystring, and got an error when loading the parent
page.

" Invalid URL form or fully-qualified absolute URL was used. Use relative
URLs. "

Oh, well.

You could use the Application/Session scope to share variables between
caller and callee pages when using Server.Execute/Server.Transfer. Make sure
to clean up after yourself and only store simple variables or threadsafe
objects.
Jul 22 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: fochie | last post by:
Greetings, I'm having a problem when I try to GET a file from my server via xmlhttp when using Mozilla. With IE I can get any type of file fine, get/display headers fine, etc. With Mozilla,...
1
by: Ike | last post by:
Ive copied an online example for writing out a php file, programmatically, then would like to re-display that data in a browswer window that automatically refreshes as the data file (getdata.php,...
5
by: hatsumoto | last post by:
Hello, I create an ActiveXObject("Msxml2.XMLHTTP") from my HTML page to submit (i.e. post) XML to a server. I can see the content of the XML response via javascript alert(xmlhttp.responseText)....
9
by: balakrishnan.dinesh | last post by:
hi friends, Exactly what i want to know is, In my product we are using xmlhttp request to retrive some data from the server, And Im using IE browser, its working fine in IE. Now i want to work...
13
by: yawnmoth | last post by:
<http://www.quirksmode.org/book/printable/xmlhttp.txtshows two alternatives to Microsoft.XMLHTTP - Msxml2.XMLHTTP and Msxml3.XMLHTTP. If my understanding is correct, the different numbers refer to...
1
by: wkerplunk | last post by:
Below is what I have build with several different languages. It works great but I need help, I am stuck. When you click on an item in the dropdown autocomplete div it does a mousedown function...
3
by: Andrewh | last post by:
Hi, I am having a bit of a problem with using xmlhttp. The code of the javascript file is shown below used in Windows XP. var xmlhttp = null; function SetURLDiv(url) { if...
2
by: trpost | last post by:
Is it possible to execute javascript as passed in xmlHttp.responseText Here is what I am doing: search.js var xmlHttp xmlHttp=GetXmlHttpObject() var url="search.php"...
1
by: StevenS | last post by:
Ok, I'm very new to AJAX programming, and fairly new to Javascript. (I was originally trained on low-level C programming.) I'm trying to build a simple AJAX routine in a file named ajax.js: ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.