#INCLUDE FILE= variable

Discussion in 'ASP General' started by Carolyn Speakman, Aug 20, 2004.

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

    Thanks,
    Carolyn
     
    Carolyn Speakman, Aug 20, 2004
    #1
    1. Advertising

  2. 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-us/iissdk/iis/ref_vbom_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"
     
    Bob Barrows [MVP], Aug 20, 2004
    #2
    1. Advertising

  3. 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-us/iissdk/iis/ref_vbom_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"
    >
    >
    >
     
    Carolyn Speakman, Aug 20, 2004
    #3
  4. Carolyn Speakman

    Jeff Cochran Guest

    On Fri, 20 Aug 2004 04:25:02 -0700, "Carolyn Speakman"
    <> 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
     
    Jeff Cochran, Aug 20, 2004
    #4
  5. 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-us/iissdk/iis/ref_vbom_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"
     
    Bob Barrows [MVP], Aug 20, 2004
    #5
  6. Carolyn Speakman

    Patrice Guest

    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" <> a écrit dans
    le message de news:...
    > 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-us/iissdk/iis/ref_vbom_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"
    > >
    > >
    > >
     
    Patrice, Aug 20, 2004
    #6
  7. 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" <> a écrit dans
    > le message de news:...
    > > 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-us/iissdk/iis/ref_vbom_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"
    > > >
    > > >
    > > >

    >
    >
    >
     
    Carolyn Speakman, Aug 20, 2004
    #7
  8. Carolyn Speakman

    Ray at Guest

    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" <> wrote in
    message news:...
    > 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" <> a écrit
    >> dans
    >> le message de news:...
    >> > 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-us/iissdk/iis/ref_vbom_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"
    >> > >
    >> > >
    >> > >

    >>
    >>
    >>
     
    Ray at, Aug 20, 2004
    #8
  9. Carolyn Speakman

    Patrice Guest

    #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" <> a écrit dans
    le message de news:...
    > 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" <> a écrit

    dans
    > > le message de news:...
    > > > 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-us/iissdk/iis/ref_vbom_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"
    > > > >
    > > > >
    > > > >

    > >
    > >
    > >
     
    Patrice, Aug 20, 2004
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Victor Bazarov

    #include "file" -vs- #include <file>

    Victor Bazarov, Mar 5, 2005, in forum: C++
    Replies:
    4
    Views:
    549
    Exits Funnel
    Mar 6, 2005
  2. PTM
    Replies:
    1
    Views:
    340
    Andy Dingley
    Nov 12, 2007
  3. naveeddil
    Replies:
    0
    Views:
    591
    naveeddil
    Jan 4, 2008
  4. Andreas Bogenberger
    Replies:
    3
    Views:
    958
    Andreas Bogenberger
    Feb 22, 2008
  5. Eric
    Replies:
    10
    Views:
    483
Loading...

Share This Page