Request.QueryString

Discussion in 'ASP General' started by thomas, May 18, 2005.

  1. thomas

    thomas Guest

    I'm having a bit of trouble using Request.QueryString(). 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.asp?id=a">A</a> |
    <a href="browse.asp?id=b">B</a> |
    <a href="browse.asp?id=c">C</a>

    </body>
    </html>


    browse.asp
    ========
    <%@ Language="VBScript" %>

    <%

    dim objDom, fileExists, objFieldValue, objPI

    st1 = Request.QueryString("id")

    set xmlDocument = CreateObject("MSXML2.FreeThreadedDOMDocument")
    xmlDocument.async="false"
    xmlDocument.load(Server.MapPath("db/data.xml"))

    set xslDocument = CreateObject("MSXML2.FreeThreadedDOMDocument")
    xslDocument.async="false"
    xslDocument.load(Server.MapPath("browse_results.xsl"))

    Set XSLTemplate = Server.CreateObject("MSXML2.XSLTemplate")
    Set XSLTemplate.stylesheet = xslDocument
    Set proc = XSLTemplate.createProcessor()

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

    %>
     
    thomas, May 18, 2005
    #1
    1. Advertising

  2. What error are you getting? What unexpected results are you getting? Etc.

    Ray at work

    "thomas" <> wrote in message
    news:xnJie.12863$...
    > I'm having a bit of trouble using Request.QueryString(). 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.asp?id=a">A</a> |
    > <a href="browse.asp?id=b">B</a> |
    > <a href="browse.asp?id=c">C</a>
    >
    > </body>
    > </html>
    >
    >
    > browse.asp
    > ========
    > <%@ Language="VBScript" %>
    >
    > <%
    >
    > dim objDom, fileExists, objFieldValue, objPI
    >
    > st1 = Request.QueryString("id")
    >
    > set xmlDocument = CreateObject("MSXML2.FreeThreadedDOMDocument")
    > xmlDocument.async="false"
    > xmlDocument.load(Server.MapPath("db/data.xml"))
    >
    > set xslDocument = CreateObject("MSXML2.FreeThreadedDOMDocument")
    > xslDocument.async="false"
    > xslDocument.load(Server.MapPath("browse_results.xsl"))
    >
    > Set XSLTemplate = Server.CreateObject("MSXML2.XSLTemplate")
    > Set XSLTemplate.stylesheet = xslDocument
    > Set proc = XSLTemplate.createProcessor()
    >
    > proc.input = xmlDocument
    > proc.addParameter "text0", st1
    > proc.Transform
    > Response.Write proc.output
    >
    > %>
    >
    >
     
    Ray Costanzo [MVP], May 18, 2005
    #2
    1. Advertising

  3. thomas

    thomas Guest

    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.QueryString) 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.QueryString before, I
    thought I was doing it wrong.
     
    thomas, May 18, 2005
    #3
  4. 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" <> wrote in message
    news:mOJie.12947$...
    > 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.QueryString) 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.QueryString before, I
    > thought I was doing it wrong.
    >
    >
     
    Ray Costanzo [MVP], May 18, 2005
    #4
  5. thomas wrote:
    > I'm having a bit of trouble using Request.QueryString(). 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"
     
    Bob Barrows [MVP], May 18, 2005
    #5
  6. thomas

    thomas Guest

    Think ive got it, it was a parameter I missed in my xsl page

    cheers

    thomas
     
    thomas, May 18, 2005
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Daniel Bass
    Replies:
    2
    Views:
    3,748
    dave wanta
    Jul 4, 2003
  2. George
    Replies:
    5
    Views:
    6,656
    George
    Apr 2, 2004
  3. michaaal
    Replies:
    6
    Views:
    425
    Michael D. Kersey
    Jul 15, 2003
  4. John Davis
    Replies:
    2
    Views:
    411
    Dave Anderson
    Aug 18, 2003
  5. Ivan
    Replies:
    5
    Views:
    164
Loading...

Share This Page