By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,107 Members | 1,216 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,107 IT Pros & Developers. It's quick & easy.

pass parameters to included files in asp

P: n/a
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 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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)

Nov 26 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.