473,241 Members | 1,539 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,241 software developers and data experts.

#INCLUDE FILE= variable

is it in any way possible to include a file specified by a variable name?

Thanks,
Carolyn
Jul 19 '05 #1
8 8292
Carolyn Speakman wrote:
is it in any way possible to include a file specified by a variable
name?

Not with #include. The only way to dynamically "include" a page is via
Server.Execute(varPageName). You can read about it here:
http://msdn.microsoft.com/library/en...m_seromexe.asp

Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 19 '05 #2
Is there a way to use that to call a page/script stored on a client machine,
that the client can specify?

"Bob Barrows [MVP]" wrote:
Carolyn Speakman wrote:
is it in any way possible to include a file specified by a variable
name?

Not with #include. The only way to dynamically "include" a page is via
Server.Execute(varPageName). You can read about it here:
http://msdn.microsoft.com/library/en...m_seromexe.asp

Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

Jul 19 '05 #3
On Fri, 20 Aug 2004 04:25:02 -0700, "Carolyn Speakman"
<Ca*************@discussions.microsoft.com> wrote:
is it in any way possible to include a file specified by a variable name?


FAQ:

How do I dynamically include files?
http://www.aspfaq.com/show.asp?id=2042

Jeff
Jul 19 '05 #4
No. The page has to be served by a web server.

You'll have to upload the file to the server where it can be executed.

Bob Barrows
Carolyn Speakman wrote:
Is there a way to use that to call a page/script stored on a client
machine, that the client can specify?

"Bob Barrows [MVP]" wrote:
Carolyn Speakman wrote:
is it in any way possible to include a file specified by a variable
name?

Not with #include. The only way to dynamically "include" a page is
via Server.Execute(varPageName). You can read about it here:
http://msdn.microsoft.com/library/en...m_seromexe.asp

Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so
I don't check it very often. If you must reply off-line, then remove
the "NO SPAM"


--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 19 '05 #5
What exactly is the overall picture ?
Do you want to execute this code server side (some kind of personnalization)
? One for each client ? Is this some client side personnalization ?

Knowing what you are trying to achieve will help to make better
suggestions...

Patrice

--

"Carolyn Speakman" <Ca*************@discussions.microsoft.com> a écrit dans
le message de news:5C**********************************@microsof t.com...
Is there a way to use that to call a page/script stored on a client machine, that the client can specify?

"Bob Barrows [MVP]" wrote:
Carolyn Speakman wrote:
is it in any way possible to include a file specified by a variable
name?

Not with #include. The only way to dynamically "include" a page is via
Server.Execute(varPageName). You can read about it here:
http://msdn.microsoft.com/library/en...m_seromexe.asp

Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

Jul 19 '05 #6
The idea is to get a listing of all .exe files in a directory on a client
computer and pass the information back to a server to update a database. The
directory is specified by the user via a form on an Extranet.

It could be possible to have a file (script or something) on the client
machine, which could be invoked via a page on the Extranet, but I still don't
know how that would really work if I can't do a #include or server.execute to
a file other than a file on the server.

Carolyn

"Patrice" wrote:
What exactly is the overall picture ?
Do you want to execute this code server side (some kind of personnalization)
? One for each client ? Is this some client side personnalization ?

Knowing what you are trying to achieve will help to make better
suggestions...

Patrice

--

"Carolyn Speakman" <Ca*************@discussions.microsoft.com> a écrit dans
le message de news:5C**********************************@microsof t.com...
Is there a way to use that to call a page/script stored on a client

machine,
that the client can specify?

"Bob Barrows [MVP]" wrote:
Carolyn Speakman wrote:
> is it in any way possible to include a file specified by a variable
> name?
>
Not with #include. The only way to dynamically "include" a page is via
Server.Execute(varPageName). You can read about it here:
http://msdn.microsoft.com/library/en...m_seromexe.asp

Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


Jul 19 '05 #7
ASP is not the right technology for this... Is this on a private network?
If so, I suggest you look into something like SMS or Altiris or something
along those lines. A Web page should have no rights whatsoever to scan a
client's hard drive and take inventory of it... Imagine if that were
default browser behavior for such a thing to be allowed. What happens when
you go to a site that is looking for C:\MyCreditCardNumbers.txt?

Ray at work

"Carolyn Speakman" <Ca*************@discussions.microsoft.com> wrote in
message news:0F**********************************@microsof t.com...
The idea is to get a listing of all .exe files in a directory on a client
computer and pass the information back to a server to update a database.
The
directory is specified by the user via a form on an Extranet.

It could be possible to have a file (script or something) on the client
machine, which could be invoked via a page on the Extranet, but I still
don't
know how that would really work if I can't do a #include or server.execute
to
a file other than a file on the server.

Carolyn

"Patrice" wrote:
What exactly is the overall picture ?
Do you want to execute this code server side (some kind of
personnalization)
? One for each client ? Is this some client side personnalization ?

Knowing what you are trying to achieve will help to make better
suggestions...

Patrice

--

"Carolyn Speakman" <Ca*************@discussions.microsoft.com> a écrit
dans
le message de news:5C**********************************@microsof t.com...
> Is there a way to use that to call a page/script stored on a client

machine,
> that the client can specify?
>
> "Bob Barrows [MVP]" wrote:
>
> > Carolyn Speakman wrote:
> > > is it in any way possible to include a file specified by a variable
> > > name?
> > >
> > Not with #include. The only way to dynamically "include" a page is
> > via
> > Server.Execute(varPageName). You can read about it here:
> > http://msdn.microsoft.com/library/en...m_seromexe.asp
> >
> > Bob Barrows
> >
> > --
> > Microsoft MVP - ASP/ASP.NET
> > Please reply to the newsgroup. This email account is my spam trap so
> > I
> > don't check it very often. If you must reply off-line, then remove
> > the
> > "NO SPAM"
> >
> >
> >


Jul 19 '05 #8
#include and server.execute are intended to execute server side code.

You could use the HTML "script" tag with the src attribute to point to a
local javaScript file.
IMO it would be better to just have an ASP Page that send the appropriate
script to the browser (so that you don't have to deploy anything to target
machines). In your client side JavaScript code you sould be able to create a
Scripting.FileSystemObject to browse a directory for files.

Note that users will have to accept to run this script or that you'll have
to alter a global security policy as this is obviously not allowed by
default...

Patrice

--

"Carolyn Speakman" <Ca*************@discussions.microsoft.com> a écrit dans
le message de news:0F**********************************@microsof t.com...
The idea is to get a listing of all .exe files in a directory on a client
computer and pass the information back to a server to update a database. The directory is specified by the user via a form on an Extranet.

It could be possible to have a file (script or something) on the client
machine, which could be invoked via a page on the Extranet, but I still don't know how that would really work if I can't do a #include or server.execute to a file other than a file on the server.

Carolyn

"Patrice" wrote:
What exactly is the overall picture ?
Do you want to execute this code server side (some kind of personnalization) ? One for each client ? Is this some client side personnalization ?

Knowing what you are trying to achieve will help to make better
suggestions...

Patrice

--

"Carolyn Speakman" <Ca*************@discussions.microsoft.com> a écrit dans le message de news:5C**********************************@microsof t.com...
Is there a way to use that to call a page/script stored on a client

machine,
that the client can specify?

"Bob Barrows [MVP]" wrote:

> Carolyn Speakman wrote:
> > is it in any way possible to include a file specified by a variable > > name?
> >
> Not with #include. The only way to dynamically "include" a page is via > Server.Execute(varPageName). You can read about it here:
> http://msdn.microsoft.com/library/en...m_seromexe.asp >
> Bob Barrows
>
> --
> Microsoft MVP - ASP/ASP.NET
> Please reply to the newsgroup. This email account is my spam trap so I > don't check it very often. If you must reply off-line, then remove the > "NO SPAM"
>
>
>


Jul 19 '05 #9

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

Similar topics

6
by: JStrummer | last post by:
I have a question regarding paths and the include() statement in PHP. I develop in a Windows environment and will be publishing to a Linux server. I would like to do the following: 1. Setup my...
2
by: Marcus | last post by:
Hello, I am having problems with an include statement. I'm setting a session variable flag and then including a file, and in that include file I have a check at the top to make sure that the...
2
by: chopper | last post by:
Please excuse the long post but I can't think of shorter way of explaining the issue. Please could someone advise on the following: I'm writing preview functionality for a CMS written in ASP....
11
by: wenmang | last post by:
Hi, all: What will happen if header files with the exact same names but with different contents and declared/defined without include guard reside in the include path for the compiler? Are these...
3
by: Mike | last post by:
I'm new to PHP - moving over from ASP. I have a number of include files, the first of which sets the value of a variable $loginmsg. I use that variable in a subsequent include file, but get a...
6
by: atv | last post by:
Alright, i have some questions concerning include files en global variables.I hope someone is willing to answer these. 1).Why is it that if i define a global variable in a file, say main.c, and...
6
by: tshad | last post by:
In my User control, I tried to do this: *************************************************************************** <Script runat="server"> Public ClientName As String = "<!-- #include file =...
4
by: spectre | last post by:
Hello, I first create a session variable 'client' in the login.asp file The login.asp file opens a file (xxx.asp) with an include file .. If I write <!--#include file="../../../data/" &...
6
by: j.woodcock | last post by:
is there a way of having a file that's name is a variable (eg dependant on the user name) act like a include. i know that you cant define the file for an include asp tag using a variable and that...
4
by: rocketeer | last post by:
I've a set of Javascript classes that maintain state. For example, gm.js might be: var GroupManager { groups: {} }; Over time I add new groups to the list: GroupManager.groups = myGroup; ...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.