Unwanted Comma

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

    Unwanted Comma


    I'm testing the output of variables passed from my 1st ASP to my 2nd ASP.

    This is the code ...

    <%
    response.write "C-" & request.queryst ring("myCounter ")
    response.write "<br>"
    response.write "1-" & request.queryst ring("txtBCQty1 ")
    response.write "<br>"
    response.write "2-" & request.queryst ring("txtBCQty2 ")
    response.write "<br>"
    response.write "3-" & request.queryst ring("txtBCQty3 ")
    response.write "<br>"
    response.write "4-" & request.queryst ring("txtBCQty4 ")
    response.write "<br>"
    response.end
    %>

    This is the output ...

    C-4
    1-32,
    2-45
    3-67
    4-99


    Why is there a comma after the value "32" ???




  • Aaron Bertrand [MVP]

    #2
    Re: Unwanted Comma

    Because you have two form elements on the previous page named txtBCQty1?

    --
    Aaron Bertrand
    SQL Server MVP



    "PW" <pwa@NObigSPAMp ond.net.au> wrote in message
    news:OKH1H$jPEH A.1644@TK2MSFTN GP09.phx.gbl...[color=blue]
    >
    > I'm testing the output of variables passed from my 1st ASP to my 2nd ASP.
    >
    > This is the code ...
    >
    > <%
    > response.write "C-" & request.queryst ring("myCounter ")
    > response.write "<br>"
    > response.write "1-" & request.queryst ring("txtBCQty1 ")
    > response.write "<br>"
    > response.write "2-" & request.queryst ring("txtBCQty2 ")
    > response.write "<br>"
    > response.write "3-" & request.queryst ring("txtBCQty3 ")
    > response.write "<br>"
    > response.write "4-" & request.queryst ring("txtBCQty4 ")
    > response.write "<br>"
    > response.end
    > %>
    >
    > This is the output ...
    >
    > C-4
    > 1-32,
    > 2-45
    > 3-67
    > 4-99
    >
    >
    > Why is there a comma after the value "32" ???
    >
    >
    >
    >[/color]


    Comment

    • PW

      #3
      Re: Unwanted Comma


      "Aaron Bertrand [MVP]" <aaron@TRASHasp faq.com> wrote in message
      news:eE433NmPEH A.1128@TK2MSFTN GP12.phx.gbl...[color=blue]
      > Because you have two form elements on the previous page named txtBCQty1?[/color]


      DOH!!! I had hard-coded a second one for testing.

      Thanks :-)



      Comment

      • Larry Bud

        #4
        Re: Unwanted Comma

        "PW" <pwa@NObigSPAMp ond.net.au> wrote in message news:<OKH1H$jPE HA.1644@TK2MSFT NGP09.phx.gbl>. ..[color=blue]
        > I'm testing the output of variables passed from my 1st ASP to my 2nd ASP.
        >
        > This is the code ...
        >
        > <%
        > response.write "C-" & request.queryst ring("myCounter ")
        > response.write "<br>"
        > response.write "1-" & request.queryst ring("txtBCQty1 ")
        > response.write "<br>"
        > response.write "2-" & request.queryst ring("txtBCQty2 ")
        > response.write "<br>"
        > response.write "3-" & request.queryst ring("txtBCQty3 ")
        > response.write "<br>"
        > response.write "4-" & request.queryst ring("txtBCQty4 ")
        > response.write "<br>"
        > response.end
        > %>
        >
        > This is the output ...
        >
        > C-4
        > 1-32,
        > 2-45
        > 3-67
        > 4-99
        >
        >
        > Why is there a comma after the value "32" ???[/color]

        Because your querystring must say something like

        ?mycounter=4&tx tBCQty1=32,&txt BCQty2=45

        etc....

        Comment

        Working...