Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > SSI/ASP PROBLEM (Query String) HELP!!!

Reply
Thread Tools

SSI/ASP PROBLEM (Query String) HELP!!!

 
 
Jeremy
Guest
Posts: n/a
 
      12-11-2003
I'm posting my message again since I've received 0 replies the first time.


In IIS5 with ASP when I try to run an SSI command:

<!--#include virtual="/asp_scripts/template.asp?section=1&sub=Main" -->

I get "404 Object Not Found" But if I remove the query string like so:

<!--#include virtual="/asp_scripts/template.asp" -->

It works just fine.

Any ideas on how to fix this problem? Time is of the essence and I
really appreciate your time and responses.

Thanks,
Jeremy
 
Reply With Quote
 
 
 
 
Tim Slattery
Guest
Posts: n/a
 
      12-11-2003
http://www.velocityreviews.com/forums/(E-Mail Removed) (Jeremy) wrote:

>I'm posting my message again since I've received 0 replies the first time.
>
>
>In IIS5 with ASP when I try to run an SSI command:
>
><!--#include virtual="/asp_scripts/template.asp?section=1&sub=Main" -->
>
>I get "404 Object Not Found" But if I remove the query string like so:


I'm a bit surprised at the message, but not at the fact that this
doesn't work. The "include" directive just reads another file and
plunks it into the file currently being worked on. It does not make a
web request, which is what you are trying to do here. This simply will
not work.

--
Tim Slattery
MS MVP(DTS)
(E-Mail Removed)
 
Reply With Quote
 
 
 
 
Bob Barrows
Guest
Posts: n/a
 
      12-11-2003
Jeremy wrote:
> I'm posting my message again since I've received 0 replies the first
> time.
>
>
> In IIS5 with ASP when I try to run an SSI command:
>
> <!--#include virtual="/asp_scripts/template.asp?section=1&sub=Main"
> -->
>
> I get "404 Object Not Found" But if I remove the query string like so:
>
> <!--#include virtual="/asp_scripts/template.asp" -->
>
> It works just fine.


This is expected. Code in an Included page has access to the querystring of
the page in which it is Included. If the required values are not part of the
request collection of that page, then you need to use global variables in
that page which are referenced in the code in the Included page:

<%
dim strsection, strsub
strsection=1
strsub="Main"
%>

In template.asp, instead of using
request.querystring("section")

use

strsection

HTH,
Bob Barrows



--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


 
Reply With Quote
 
Jeremy Capp
Guest
Posts: n/a
 
      12-11-2003
Thanks, Bob, for the reply. I guess I'm just going to have to change all
my .shtml files to .asp files so I can create these variables.

It sucks that ASP/IIS doesn't allow this.....putting query strings that
include CGI/Perl scripts via SSI works just fine.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
Jeremy Capp
Guest
Posts: n/a
 
      12-11-2003
Tim,

I appreciate the reply. However, I've been programming in Perl for
many years and putting a query string into an include ALWAYS worked. I
guess ASP just sucks and I'll have to change all my .shtml files to .asp
files so I can create the variables to pass to the script I'm trying to
call.

Thanks again.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
Tim Slattery
Guest
Posts: n/a
 
      12-11-2003
Jeremy Capp <(E-Mail Removed)> wrote:

>Tim,
>
> I appreciate the reply. However, I've been programming in Perl for
>many years and putting a query string into an include ALWAYS worked. I
>guess ASP just sucks and I'll have to change all my .shtml files to .asp
>files so I can create the variables to pass to the script I'm trying to
>call.


The SSI facility in ASP is *not* the same as anything in Perl, I'm
certain of that!

I know Perl, but I don't know of an "include" facility in that
language. I assume that you actually were submitting a web request and
catching the result in your Perl code. As you now know, ASP's
"include" doesn't work like that.

--
Tim Slattery
MS MVP(DTS)
(E-Mail Removed)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem problem problem :( Need Help Mike ASP General 2 05-11-2004 08:36 AM



Advertisments