473,394 Members | 1,893 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

querystring variables in #include files

Hello...I'm trying to include querystring variables in a #include but it's
not working

this works:

<!--#include file="calendar/calendar.asp-->

this does not:

<!--#include
file="calendar/calendar.asp?eventtype=1&curmonth=8&curyear=2006"-->

any suggestions.

Thank You
Aug 11 '06 #1
3 9184
=?Utf-8?B?VG9kZA==?= wrote on 11 aug 2006 in
microsoft.public.inetserver.asp.general:
Hello...I'm trying to include querystring variables in a #include but
it's not working

this works:

<!--#include file="calendar/calendar.asp-->

this does not:

<!--#include
file="calendar/calendar.asp?eventtype=1&curmonth=8&curyear=2006"-->
The second would have no sense, since the <!--#include only inserts the
litteral content of the file, whatever it's extension[!!!], in the calling
file, and does not execute by itself.

This litteral content can be asp code or any other and is,
if it is asp code only executed as part of the "include calling" page.

Why do we often stress include called pages should have a .asp extension?

Because with another extension, say: .txt, .inc, .html, if the page were
accessable from the internet, it's content could be read by anyone.

So request.querystring("eventtype") will only return what is in the main
..asp page, even if this [part of code is in the included file.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Aug 11 '06 #2
Todd wrote:
Hello...I'm trying to include querystring variables in a
#include but it's not working
Patient: Doctor, it hurts when I do this
Doctor: Then don't do that

Seriously, there is no way to do what you suggest. The included file is
treated like a script fragment and shares form & querystring information
with the enclosing document. In fact, the entire document is parsed as one
document ONLY AFTER all of the include files are assembled.
http://msdn.microsoft.com/library/en...6dc027a608.asp

I suspect from your example that you might get what you want from
Server.Execute()
http://msdn.microsoft.com/library/en...ef530de23f.asp

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.
Aug 11 '06 #3
Thank you...yes..I forgot about how it works

"Dave Anderson" wrote:
Todd wrote:
Hello...I'm trying to include querystring variables in a
#include but it's not working

Patient: Doctor, it hurts when I do this
Doctor: Then don't do that

Seriously, there is no way to do what you suggest. The included file is
treated like a script fragment and shares form & querystring information
with the enclosing document. In fact, the entire document is parsed as one
document ONLY AFTER all of the include files are assembled.
http://msdn.microsoft.com/library/en...6dc027a608.asp

I suspect from your example that you might get what you want from
Server.Execute()
http://msdn.microsoft.com/library/en...ef530de23f.asp

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.
Aug 11 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Robb Meade | last post by:
Hi all, A recent project that I had finished and went live with no apparant problems. My client received an email from a user who mentioned that by accident they had been typing (over the...
3
by: Fredrik/Sweden | last post by:
Hi folks ! got this problem... i have a table 'Accounts' in my database, which contains a bunch of users. From the main menu i choose "edit user" and all users in the db are presented in a table....
4
by: Max | last post by:
Hello. This is the first time I've posted to a newsgroup, and I do this because I'm in desperate need of help. I'm working a user management system, and when I activate a user that has registered...
11
by: Joey Martin | last post by:
I am passing a sql string thru my querystring for the next page to capture. example: www.xxxxxxxx.com/index.asp?str=select * from table where name like '%doe%' Passing a basic string works...
8
by: scott | last post by:
hi, sorry if this has been adressed some where elss. if it has plz can you point me to it and ill go read it. any way, i want to declare some variables with in a header file. lets say int i; ...
5
by: Me | last post by:
I was wondering if after parsing Querystring, I could initialize it. Is it possible? Thank you, -Me
111
by: Nate | last post by:
Hello, I am looking for a method to automatically declare variables in C. I'm not sure if there is a good way to do this, but I had something like this in mind... int i; for(i = 1; i < 4;...
0
by: bharathreddy | last post by:
Here I will given an example on how to access the session, application and querystring variables in an .cs class file. Using System.Web.HttpContext class. 1) For accesing session variables :...
4
by: .nLL | last post by:
Hi, im am a classic asp developer and started to learn asp.net but got stuck with a simple problem even before i step in to further. to learn i have started from a simple project (a login system...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.