Request.QueryString

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • thomas

    Request.QueryString

    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

    %>


  • Ray Costanzo [MVP]

    #2
    Re: Request.QuerySt ring

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

    Ray at work

    "thomas" <thomas_patton@ ntlworld.com> wrote in message
    news:xnJie.1286 3$Pi3.8178@news fe4-win.ntli.net...[color=blue]
    > I'm having a bit of trouble using Request.QuerySt ring(). I want to click[/color]
    on[color=blue]
    > 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
    >
    > %>
    >
    >[/color]


    Comment

    • thomas

      #3
      Re: Request.QuerySt ring

      Nothing apart from "The page cannot be displayed" Take a look


      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.


      Comment

      • Ray Costanzo [MVP]

        #4
        Re: Request.QuerySt ring

        I don't think the querystring is your issue. First step is to get your
        browser to show you what's really happening.


        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" <thomas_patton@ ntlworld.com> wrote in message
        news:mOJie.1294 7$Pi3.9411@news fe4-win.ntli.net...[color=blue]
        > 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.
        >
        >[/color]


        Comment

        • Bob Barrows [MVP]

          #5
          Re: Request.QuerySt ring

          thomas wrote:[color=blue]
          > I'm having a bit of trouble using Request.QuerySt ring(). I want to[/color]


          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"


          Comment

          • thomas

            #6
            Re: Request.QuerySt ring

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

            cheers

            thomas


            Comment

            Working...