pass parameters to included files in asp

J

jacobyv

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
 
E

Evertjan.

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top