473,911 Members | 6,170 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

#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 8342
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.m icrosoft.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 personnalizatio n)
? One for each client ? Is this some client side personnalizatio n ?

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

Patrice

--

"Carolyn Speakman" <Ca************ *@discussions.m icrosoft.com> a écrit dans
le message de news:5C******** *************** ***********@mic rosoft.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 personnalizatio n)
? One for each client ? Is this some client side personnalizatio n ?

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

Patrice

--

"Carolyn Speakman" <Ca************ *@discussions.m icrosoft.com> a écrit dans
le message de news:5C******** *************** ***********@mic rosoft.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:\MyCreditCard Numbers.txt?

Ray at work

"Carolyn Speakman" <Ca************ *@discussions.m icrosoft.com> wrote in
message news:0F******** *************** ***********@mic rosoft.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
personnalizatio n)
? One for each client ? Is this some client side personnalizatio n ?

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

Patrice

--

"Carolyn Speakman" <Ca************ *@discussions.m icrosoft.com> a écrit
dans
le message de news:5C******** *************** ***********@mic rosoft.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.FileS ystemObject 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.m icrosoft.com> a écrit dans
le message de news:0F******** *************** ***********@mic rosoft.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 personnalizatio n) ? One for each client ? Is this some client side personnalizatio n ?

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

Patrice

--

"Carolyn Speakman" <Ca************ *@discussions.m icrosoft.com> a écrit dans le message de news:5C******** *************** ***********@mic rosoft.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
4675
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 include references in such a way that I don't have to change them all every time I have to publish to the production server 2. Setup above in such a way that won't involve php.ini (& LInux equivalent), as I have access to edit this file...
2
1894
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 session variable is set, otherwise I stop executing and redirect. My problem is that this works if I use a relative path to the include file, but not if I use the full path. If I use the full path, it does not read the session flag as being set,...
2
1655
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. Currently, when a page is published (physical file created in the website) it contains include directives to pull in commonly used bits of HTML and ASP such as the header and footer of pages. In the preview functionality I want to be able to have...
11
4035
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 header files are included more than once? If so, is it the lastest included file always overwrite the previous one? Is this behavior predictable? thanks.
3
7667
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 "Notice: Undefined variable loginmsg" warning. I've had a good look at previous posts concerning this warning, and see that isset() is recommended to prevent this kind of warning. Is this totally necessary? In ASP, and include file becomes...
6
9586
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 i have also other functions defined in that file, i can use the global in all functions, but once i split up the rest of the function in other files, i cannot use the global? Isn't that strange, all the files compiled should be treated as one...
6
2132
by: tshad | last post by:
In my User control, I tried to do this: *************************************************************************** <Script runat="server"> Public ClientName As String = "<!-- #include file = ...\includes\StaffingHeaders.inc -->" </Script> <%=ClientName%> ****************************************************************************
4
2726
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/" & session("client") & "/language_ger.inc"--> I have a message stating that the application can't find the file.
6
4195
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 reading the file using "Response.Write FSO.OpenTextFile(ppp, 1, False, False).readall" prints the file, and treating it like a html file. can anyone suggest another way of doing this?
4
2236
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; If I include another Javascript file that also includes a reference to
0
10037
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9879
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10921
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
11055
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9727
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7250
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5939
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
4337
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3360
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.