Print Page | Close Window

Query Strings

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=7953
Printed Date: 01 April 2026 at 1:12am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Query Strings
Posted By: Phat
Subject: Query Strings
Date Posted: 09 December 2003 at 3:11am
Can you use query strings in includes files.

Like
<!--#include file="../includes/inc_header.asp?Version=2" -->


I tried it but i get a file not found error. Is there anything special you have to do.



Replies:
Posted By: ljamal
Date Posted: 09 December 2003 at 7:10am
No

-------------
L. Jamal Walton

http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming


Posted By: theSCIENTIST
Date Posted: 09 December 2003 at 8:30am
Yep, I tried it myself, and it always gives the file not found error, my guessing is that SSI does not differenciate what's the file and what's the querys passed on it, to SSI it's all part of the filename so it can't find the file, shame, it could be useful.


Posted By: Phat
Date Posted: 09 December 2003 at 9:16am
Guess i will find another way then.


Posted By: Mart
Date Posted: 09 December 2003 at 9:17am
You cant do querystring in SSI because its done on the server. What you can do is

Dim variable
variable = "whatever"

You can then do your include and get the variable normally.
Mart.


Posted By: theSCIENTIST
Date Posted: 09 December 2003 at 12:51pm
How so Mart?


Posted By: pmormr
Date Posted: 09 December 2003 at 1:57pm

use server.execute instead of ssi.. all ssi does is put's the code in the file where you put the ssi invoke...

Server.Execute("../includes/inc_header.asp?Version=2")



-------------
Paul A Morgan

http://www.pmorganphoto.com/" rel="nofollow - http://www.pmorganphoto.com/


Posted By: pmormr
Date Posted: 09 December 2003 at 1:58pm
server.execute actually executes the code in the file

-------------
Paul A Morgan

http://www.pmorganphoto.com/" rel="nofollow - http://www.pmorganphoto.com/


Posted By: Mart
Date Posted: 09 December 2003 at 2:35pm
SSI has the same effect... And server.Execute doesnt have access to all resources. I mean like this


<%
'this is the code
Dim var
var = "6"
%>
<!--#include file="include.inc"-->


<%
'include.inc
Response.Write(var)
%>



Posted By: theSCIENTIST
Date Posted: 09 December 2003 at 3:58pm
Got ya.


Posted By: Phat
Date Posted: 11 December 2003 at 1:27am
To anyone interested this may be an answer to the problem. I have not tried it as yet but.

http://planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=8649&lngWId=4 - http://planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeI d=8649&lngWId=4



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net