472,122 Members | 1,395 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

File Sytem Object versus MSXML

Hello:

I need to dynamically include documents stored in my own website.
The website is coded in ASP.
As far as I know there are two common options: FSO and the MSXML Objects.
Which one of the two would be less of a resource hog for IIS ? Keep in mind
that the documetns I want to include are stored in the server where the
website resides, not on another webserver. Otherwise I'd have no choice but
to use msxml.

Thanks in advance.

Edward
Jan 16 '07 #1
7 1723

"Edward" <no****@nowhere.comwrote in message
news:qs8rh.662035$1T2.29971@pd7urf2no...
Hello:

I need to dynamically include documents stored in my own website.
The website is coded in ASP.
As far as I know there are two common options: FSO and the MSXML Objects.
Which one of the two would be less of a resource hog for IIS ? Keep in
mind
that the documetns I want to include are stored in the server where the
website resides, not on another webserver. Otherwise I'd have no choice
but
to use msxml.
I'm not sure why you would think MSXML would figure in any such solution.
FSO is easy enough to use for standard text content. ADODB.Stream is a more
flexible solution that handles both text and binary content fairly well
Thanks in advance.

Edward


Jan 16 '07 #2
Edward wrote:
I need to dynamically include documents stored in my own
website. The website is coded in ASP.
Depending on what you mean by "dynamically include", you could include
Server.Execute() or <IFRAMEto solve your problem, as well.


--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.
Jan 16 '07 #3
"Edward" <no****@nowhere.comwrote in message
news:qs8rh.662035$1T2.29971@pd7urf2no...
Hello:

I need to dynamically include documents stored in my own website.
The website is coded in ASP.
As far as I know there are two common options: FSO and the MSXML Objects.
Which one of the two would be less of a resource hog for IIS ? Keep in
mind
that the documetns I want to include are stored in the server where the
website resides, not on another webserver. Otherwise I'd have no choice
but
to use msxml.

Thanks in advance.
Are you aware of this?

<!--#include file="{yourFile}"-->
Jan 16 '07 #4
Thank you guys for the replies.

1. Yes, I know about includes. The known problem with includes is that one
cannot use variables in them.

2. I didn't know about Server.Execute (Yeah, I know, I am a newbie LOL).
This will be for me the best solution when it comes to dynamically inserting
local documents into my ASP pages.
There are some limitations, of course, like variables not passed back and
forth between documents.

3. I still will use XMLHTTP to fetch some content from other server(s). Some
of the advantages of this over the suggested IFRAME tag are:

a- The content becomes part of your page, making search engines spider it as
if were yours.
b- With IFRAME the inserted page probably won't be spidered, and it would
create an additional scroll bar, which tends to confuse visitors.

Thanks again for the feedback

Edward
Jan 16 '07 #5
On Tue, 16 Jan 2007 16:19:29 -0600, Edward <no****@nowhere.comwrote:
2. I didn't know about Server.Execute (Yeah, I know, I am a newbie LOL).
This will be for me the best solution when it comes to dynamically
inserting
local documents into my ASP pages.
There are some limitations, of course, like variables not passed back and
forth between documents.
You can use the MTxSpm.SharedPropertyGroupManager object to pass
information between pages. You can pass anything you like from a page to
any page it calls using Server.Execute, and those pages can pass scalars
(but not objects) back. A short example follows:

index.asp:
<% Option Explicit

' A function that will be exposed to the page
Function F : F = "index.asp -- F()" : End Function

' Determine the page to execute
Dim page
Select Case Request.QueryString("page")
Case "c" : page = "c.asp"
Case "b" : page = "b.asp"
Case Else: page = "a.asp"
End Select

' Create a shared property group for that page
Dim grpMgr, propGrp, prop
Set grpMgr = CreateObject("MTxSpm.SharedPropertyGroupManager")
Set propGrp = grpMgr.CreatePropertyGroup(page, 0, 0, Empty)

' Create a shared property that provides access to F()
Set prop = propGrp.CreateProperty("F", Empty)
prop.Value = GetRef("F")
Server.Execute page
%>

a.asp, b.asp, c.asp (be sure to change the value of the Page constant for
each):
<% Option Explicit
Const Page = "a.asp"

' Get the shared property group the page
Dim grpMgr, propGrp, prop
Set grpMgr = CreateObject("MTxSpm.SharedPropertyGroupManager")
Set propGrp = grpMgr.CreatePropertyGroup(Page, 0, 0, Empty)

' Get the shared property that provides access to F()
Set prop = propGrp.CreateProperty("F", Empty)

Response.ContentType = "text/plain"
Response.Write "This is " & Page & vbNewLine

If IsObject(prop.Value) Then
Dim f: Set f = prop.Value
Response.Write "Got " & TypeName(prop.Value) & vbNewLine
Response.Write f()
Else
Response.Write "Expected function object but got " _
& TypeName(prop.Value) & vbNewLine
End If
%>
--
Justin Piper
Bizco Technologies
http://www.bizco.com/
Jan 16 '07 #6

"Edward" <no****@nowhere.comwrote in message
news:Rbcrh.662595$1T2.472934@pd7urf2no...
Thank you guys for the replies.

1. Yes, I know about includes. The known problem with includes is that one
cannot use variables in them.
True, but you can conditionally include files if you know there names, which
I suppose you must do if they reside on your server?

<%
Select Case True
Case a
%>
<!--#include file="a.asp"-->
<%
Case b
%>
<!--#include file="b.asp"-->
%>
....
<%
End Select
%>

If you have loads of them, this approach might not be practical though...

--
Mike Brind
Jan 17 '07 #7
Mike Brind wrote:
<%
Select Case True
Case a
%>
<!--#include file="a.asp"-->
<%
Case b
%>
<!--#include file="b.asp"-->
%>
...
<%
End Select
%>

If you have loads of them, this approach might not be practical
though...
Especially since every single one of them must be parsed every time the page
is requested.

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.
Jan 17 '07 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

13 posts views Thread by yawnmoth | last post: by

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.