Can I dynamically obtain include files

Discussion in 'ASP General' started by Sue Barth, Dec 16, 2004.

  1. Sue Barth

    Sue Barth Guest

    Hello,
    I'm trying to build a part of an application that will use an include file
    based on a user's selection (still in ASP 3.0!).
    Their selection is stored in a database. I've tried using variables as
    either the entire include file or in parts of the include file, but nothing
    I've tried works - I.e.:

    myTemplate=objRS("template")
    <!-- #include file="inc_<% response.write myTemplate %>.asp" -->

    Is there any way to accomplish this?

    Thanks in advance,
    Sue
     
    Sue Barth, Dec 16, 2004
    #1
    1. Advertising

  2. Sue Barth

    frank Guest

    Try Server.Execute("myTemplate.asp")
    All FORM vars are passed to it and all session vars, application vars,
    cookies are available to the script. It's a powerful command.
    Read more here
    http://www.aspfaq.com/show.asp?id=2042

    Regards
    Frank



    Sue Barth wrote:
    > Hello,
    > I'm trying to build a part of an application that will use an include file
    > based on a user's selection (still in ASP 3.0!).
    > Their selection is stored in a database. I've tried using variables as
    > either the entire include file or in parts of the include file, but nothing
    > I've tried works - I.e.:
    >
    > myTemplate=objRS("template")
    > <!-- #include file="inc_<% response.write myTemplate %>.asp" -->
    >
    > Is there any way to accomplish this?
    >
    > Thanks in advance,
    > Sue
    >
    >
     
    frank, Dec 16, 2004
    #2
    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. Quentin

    Include Files Dynamically

    Quentin, Jul 28, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    631
    Bjoern Wolfgardt
    Jul 28, 2003
  2. Yarik
    Replies:
    2
    Views:
    359
    Yarik
    Aug 25, 2006
  3. Andreas Bogenberger
    Replies:
    3
    Views:
    973
    Andreas Bogenberger
    Feb 22, 2008
  4. Fredxx
    Replies:
    3
    Views:
    655
    Martin Thompson
    Jul 15, 2009
  5. Replies:
    3
    Views:
    150
    crjunk
    Jun 27, 2005
Loading...

Share This Page