Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > FSO or XMLHTTP

Reply
Thread Tools

FSO or XMLHTTP

 
 
Pietro
Guest
Posts: n/a
 
      06-10-2005
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.


 
Reply With Quote
 
 
 
 
Ray Costanzo [MVP]
Guest
Posts: n/a
 
      06-10-2005
What about server.execute? Is that an option for you?

Ray at work

"Pietro" <(E-Mail Removed)> wrote in message
news7iqe.15045$(E-Mail Removed). ..
> 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.
>
>



 
Reply With Quote
 
 
 
 
Sylvain Lafontaine
Guest
Posts: n/a
 
      06-10-2005
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" <(E-Mail Removed)> wrote in message
news7iqe.15045$(E-Mail Removed). ..
> 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.
>
>



 
Reply With Quote
 
Pietro
Guest
Posts: n/a
 
      06-10-2005
"Ray Costanzo [MVP]" wrote :

> What about server.execute? Is that an option for you?


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



 
Reply With Quote
 
Pietro
Guest
Posts: n/a
 
      06-10-2005
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.


 
Reply With Quote
 
Ray Costanzo [MVP]
Guest
Posts: n/a
 
      06-10-2005
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" <(E-Mail Removed)> wrote in message
news:r%jqe.16038$(E-Mail Removed) ...
> 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.
>
>



 
Reply With Quote
 
Pietro
Guest
Posts: n/a
 
      06-10-2005
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.


 
Reply With Quote
 
Pietro
Guest
Posts: n/a
 
      06-11-2005
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?


 
Reply With Quote
 
Mark Schupp
Guest
Posts: n/a
 
      06-13-2005
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" <(E-Mail Removed)> wrote in message
news:fNpqe.15261$(E-Mail Removed). ..
> 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?
>
>



 
Reply With Quote
 
Chris Hohmann
Guest
Posts: n/a
 
      06-13-2005
"Pietro" <(E-Mail Removed)> wrote in message
news:6ypqe.15253$(E-Mail Removed). ..
> 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.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP FSO File Name Problem KEN ASP .Net 1 07-26-2007 06:55 AM
Msxml*.XMLHTTP vs. Microsoft.XMLHTTP yawnmoth Javascript 11 11-09-2006 08:44 PM
FSO + XMLHTTP + reading large files + errr.... Steven Burn ASP General 3 05-23-2005 04:39 PM
fso tutorial Paul ASP General 3 07-17-2003 03:14 PM
Multiple delete of files with FSO error NIck ASP General 0 07-15-2003 02:30 PM



Advertisments