Replace QueryString part

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

    Replace QueryString part

    Hi,
    Im working with 3 query strings that I dont have control over:

    mypage.asp?var1 =<%=request("so mevalue")%>
    mypage.asp?var2 =<%=request("so mevalue")%>
    mypage.asp?var3 =<%=request("so mevalue")%>

    My application is expecting only var1.
    How can I implement a replace function to replace the var2, and var3 parts
    to always be var1?

    TIA!




  • Egbert Nierop \(MVP for IIS\)

    #2
    Re: Replace QueryString part

    "Targa" <targa1SPAMSUCK S@alltel.net> wrote in message
    news:%23mNHMFd$ DHA.2216@TK2MSF TNGP10.phx.gbl. ..[color=blue]
    > Hi,
    > Im working with 3 query strings that I dont have control over:
    >
    > mypage.asp?var1 =<%=request("so mevalue")%>
    > mypage.asp?var2 =<%=request("so mevalue")%>
    > mypage.asp?var3 =<%=request("so mevalue")%>
    >
    > My application is expecting only var1.
    > How can I implement a replace function to replace the var2, and var3 parts
    > to always be var1?[/color]

    Use Request.ServerV ariables("QUERY _STRING") this will include all variables
    or use
    mypage.asp?var1 =<%=request.Que ryString%>


    [color=blue]
    > TIA!
    >
    >
    >
    >[/color]

    Comment

    • Slim

      #3
      Re: Replace QueryString part


      "Targa" <targa1SPAMSUCK S@alltel.net> wrote in message
      news:%23mNHMFd$ DHA.2216@TK2MSF TNGP10.phx.gbl. ..[color=blue]
      > Hi,
      > Im working with 3 query strings that I dont have control over:
      >
      > mypage.asp?var1 =<%=request("so mevalue")%>
      > mypage.asp?var2 =<%=request("so mevalue")%>
      > mypage.asp?var3 =<%=request("so mevalue")%>
      >
      > My application is expecting only var1.
      > How can I implement a replace function to replace the var2, and var3 parts
      > to always be var1?
      >
      > TIA!
      >[/color]


      Request.QuerySt ring(1)


      Comment

      • Evertjan.

        #4
        Re: Replace QueryString part

        Slim wrote on 29 feb 2004 in microsoft.publi c.inetserver.as p.general:
        [color=blue]
        >
        > "Targa" <targa1SPAMSUCK S@alltel.net> wrote in message
        > news:%23mNHMFd$ DHA.2216@TK2MSF TNGP10.phx.gbl. ..[color=green]
        >> Hi,
        >> Im working with 3 query strings that I dont have control over:
        >>
        >> mypage.asp?var1 =<%=request("so mevalue")%>
        >> mypage.asp?var2 =<%=request("so mevalue")%>
        >> mypage.asp?var3 =<%=request("so mevalue")%>
        >>
        >> My application is expecting only var1.
        >> How can I implement a replace function to replace the var2, and var3
        >> parts to always be var1?[/color][/color]
        [color=blue]
        > Request.QuerySt ring(1)[/color]

        To keep any errors off:

        q = ""
        if Request.QuerySt ring.Count>0 then q = Request.QuerySt ring(1)


        --
        Evertjan.
        The Netherlands.
        (Please change the x'es to dots in my emailaddress)

        Comment

        Working...