pass parameters to included files in asp

Discussion in 'ASP General' started by jacobyv@sis.unibe.ch, Nov 26, 2005.

  1. Guest

    hi

    i created survey.asp which displays the survey passed through the name
    paramter in the url.
    it works fine if i open the page like this.
    http://url/survey.asp?name=survey1

    but now i would like to include survey.asp in a different asp file,
    let's call it main.asp, and display several surveys.

    so i added the following lines to main.asp:
    <!-- #include file="survey.asp?name=suvey1"-->
    <!-- #include file="survey.asp?name=suvey2"-->

    i get the message file not found. the webserver seems to try to open
    the file "survey.asp?name=suvey1" instead of survey.asp and pass the
    paramter.

    it works fine when i includ like this
    <!-- #include file="survey.asp-->
    and open main.asp like this
    http://url/main.asp?name=survey1

    but this way i can only display only one survey in main.asp

    is there a way to pass parameter to included files or is there another
    way to include files?

    thanks for your support
    greetings yves
    , Nov 26, 2005
    #1
    1. Advertising

  2. Evertjan. Guest

    wrote on 26 nov 2005 in microsoft.public.inetserver.asp.general:

    > so i added the following lines to main.asp:
    > <!-- #include file="survey.asp?name=suvey1"-->
    > <!-- #include file="survey.asp?name=suvey2"-->
    >


    This cannot work,

    because survey.asp is not executed,
    only it's litteral text is added/included in main.asp
    before execution of the latter,

    and execution is neccessary for a querystring to have any effect.

    --
    Evertjan.
    The Netherlands.
    (Replace all crosses with dots in my emailaddress)
    Evertjan., Nov 26, 2005
    #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. tonicvodka
    Replies:
    0
    Views:
    433
    tonicvodka
    Aug 15, 2005
  2. Replies:
    0
    Views:
    902
  3. tshad
    Replies:
    20
    Views:
    871
  4. rinat
    Replies:
    3
    Views:
    8,500
    shailpatel83
    Feb 9, 2010
  5. John Smith

    Header files included in header files

    John Smith, Jul 21, 2004, in forum: C Programming
    Replies:
    18
    Views:
    603
    Jack Klein
    Jul 24, 2004
Loading...

Share This Page