473,560 Members | 2,985 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Request.QuerySt ring

I'm having a bit of trouble using Request.QuerySt ring(). I want to click on
the link to browse all <artist> records in an xml file begining with a
particular letter. Any ideas where I'm going wrong?

index.html
=======
<html>
<body>

<p>browse by artist</p>
<a href="browse.as p?id=a">A</a> |
<a href="browse.as p?id=b">B</a> |
<a href="browse.as p?id=c">C</a>

</body>
</html>
browse.asp
========
<%@ Language="VBScr ipt" %>

<%

dim objDom, fileExists, objFieldValue, objPI

st1 = Request.QuerySt ring("id")

set xmlDocument = CreateObject("M SXML2.FreeThrea dedDOMDocument" )
xmlDocument.asy nc="false"
xmlDocument.loa d(Server.MapPat h("db/data.xml"))

set xslDocument = CreateObject("M SXML2.FreeThrea dedDOMDocument" )
xslDocument.asy nc="false"
xslDocument.loa d(Server.MapPat h("browse_resul ts.xsl"))

Set XSLTemplate = Server.CreateOb ject("MSXML2.XS LTemplate")
Set XSLTemplate.sty lesheet = xslDocument
Set proc = XSLTemplate.cre ateProcessor()

proc.input = xmlDocument
proc.addParamet er "text0", st1
proc.Transform
Response.Write proc.output

%>
Jul 22 '05 #1
5 2546
What error are you getting? What unexpected results are you getting? Etc.

Ray at work

"thomas" <th***********@ ntlworld.com> wrote in message
news:xn******** **********@news fe4-win.ntli.net...
I'm having a bit of trouble using Request.QuerySt ring(). I want to click on the link to browse all <artist> records in an xml file begining with a
particular letter. Any ideas where I'm going wrong?

index.html
=======
<html>
<body>

<p>browse by artist</p>
<a href="browse.as p?id=a">A</a> |
<a href="browse.as p?id=b">B</a> |
<a href="browse.as p?id=c">C</a>

</body>
</html>
browse.asp
========
<%@ Language="VBScr ipt" %>

<%

dim objDom, fileExists, objFieldValue, objPI

st1 = Request.QuerySt ring("id")

set xmlDocument = CreateObject("M SXML2.FreeThrea dedDOMDocument" )
xmlDocument.asy nc="false"
xmlDocument.loa d(Server.MapPat h("db/data.xml"))

set xslDocument = CreateObject("M SXML2.FreeThrea dedDOMDocument" )
xslDocument.asy nc="false"
xslDocument.loa d(Server.MapPat h("browse_resul ts.xsl"))

Set XSLTemplate = Server.CreateOb ject("MSXML2.XS LTemplate")
Set XSLTemplate.sty lesheet = xslDocument
Set proc = XSLTemplate.cre ateProcessor()

proc.input = xmlDocument
proc.addParamet er "text0", st1
proc.Transform
Response.Write proc.output

%>

Jul 22 '05 #2
Nothing apart from "The page cannot be displayed" Take a look
http://www.madtim67.com/guitar/index.html

I use different versions of the asp page (using Request.Form instead of
Request.QuerySt ring) and the xsl page that outputs the results without any
problems and i'm pretty sure my html page is correct.

I've never passed values using a link and Request.QuerySt ring before, I
thought I was doing it wrong.
Jul 22 '05 #3
I don't think the querystring is your issue. First step is to get your
browser to show you what's really happening.
http://www.aspfaq.com/show.asp?id=2109

And then you'll see:
msxml3.dll error '80004005'

A reference to variable or parameter 'endPos' cannot be resolved. The
variable or parameter may not be defined, or it may not be in scope.

/guitar/browse.asp, line 18

In the code you posted, I don't see any "endPos" variable, so it's hard to
say what's going on there.

Ray at work

"thomas" <th***********@ ntlworld.com> wrote in message
news:mO******** **********@news fe4-win.ntli.net...
Nothing apart from "The page cannot be displayed" Take a look
http://www.madtim67.com/guitar/index.html

I use different versions of the asp page (using Request.Form instead of
Request.QuerySt ring) and the xsl page that outputs the results without any
problems and i'm pretty sure my html page is correct.

I've never passed values using a link and Request.QuerySt ring before, I
thought I was doing it wrong.

Jul 22 '05 #4
thomas wrote:
I'm having a bit of trouble using Request.QuerySt ring(). I want to

Don't forget that xml is case-sensitive ...
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 22 '05 #5
Think ive got it, it was a parameter I missed in my xsl page

cheers

thomas
Jul 22 '05 #6

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

Similar topics

5
2558
by: momo | last post by:
Hello Newsgroup, I want to pass a Request.Form variable to an ASP form, through the url for example lets say i have a form with a textfiled called "txtName" if i click the submit button for example the asp page reads the content of this txtName as Request.Form("txtName") I want to achieve that the asp form is accessed through a URL...
4
2727
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 to my system, the current admin user logged in gets logged out. I can't seem to work out how - I can't even trace back where some of the variables...
5
2394
by: Ivan | last post by:
hi, I saw some program using "request("fieldname") " instead of "request.QueryString" to get the value from URL, what's the different ?? thanks
0
3084
by: Anders Borum | last post by:
Hello! I would like to request a new method on the XsltArgumentList class, allowing developers to check the presense of a key/value pair. If you try to add a key/value pair that has already been defined in the list, an exception is thrown. Rather than using the "GetParam" method, it would be usefull to have a method called ".Exists"...
1
1870
by: FD | last post by:
For performance reason, the follwoing code (C#) to capture all the Request collection contexts is NOT recommended: string ID = Request.QueryString; But how to Capture the individual Request properties needed in the application? Thanks, FD
4
13198
by: Steve | last post by:
Hi- I'd like to set values in the QueryString if I detect that a user submits a bad value, say... ?id=333 where there is no id '333', I would like to set it to '0' for example. I tried to use Request.QueryString.Set("id", "0"); it says it is Read Only. How can this be done? Why is there a Set() method if you can't use it?
2
1835
by: mahsa | last post by:
Hi have have some link like thi http://x.com/Shoppingcart.aspx?pn=ps50210&qty_ps50210=1&pn=excel&qty_excel=1&pn=l4504000&qty_l4504000=1&sku=PS50210&cat=laminate&action=updat now I want to request the dat I use this code in as <%For Each strPartNo In Request.QueryString("pn" lngQty = Request.QueryString("qty_" & strPartNo strPartNo =...
4
25347
by: Guoqi Zheng | last post by:
On my application, I need to have different action based on the pass in query string. When the query string is not presented, I try to use If request.querystring("id") ="" THEN ...... This is what I did in trational asp, however if I did abov in ASP.NET, I always got an error of "Object reference not set to an instance of an object. " ...
6
3789
by: Ammar | last post by:
Dear All, I'm facing a small problem. I have a portal web site, that contains articles, for each article, the end user can send a comment about the article. The problem is: I the comment length is more that 1249 bytes, then the progress bar of the browser will move too slow and then displaying that the page not found!!!! If the message is...
7
9649
by: =?Utf-8?B?QVRT?= | last post by:
HOWTO Make CStr for JavaScript on ASP w/ Request.Form and QueryString In ASP, Request.Form and Request.QueryString return objects that do not support "toString", or any JavaScript string operation on parameters not passed. Example: Make a TST.asp and post to it as TST.asp?STATE=TEST <%@ Language=JavaScript %> <%
0
7841
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8066
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7920
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6191
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5458
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5175
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3605
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3585
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1169
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.