Passing a QueryString

Discussion in 'ASP General' started by Scott, Feb 11, 2006.

  1. Scott

    Scott Guest

    I'm trying to create a link (SEE LINK BELOW) to a pop-up window
    (myPopUp.asp). My problem is my sTargetPage variable is a url containing a
    querystring variable. When myPopUp.asp opens and I get my sPage query string
    value, it returns myTargetpage.asp?qs=1 and clips the 2nd querystring value
    pair.

    Can someone help me construct a link so myPopUp.asp preserves the entire
    query string? I tried using the Server.HtmlEncode comand in "FAILED ATTEMPT"
    below, but I'm still losing any querystring pairs after the 1st qs pair.




    PAGE VARIABLE: sTargetPage="myTargetpage.asp?qs=1&qs=2"

    LINK: http://www.cnn.com/myPopUp.asp?sPage=" & sTargetPage

    FAILED ATTEMPT: myPopUp.asp?sPage=" & Server.HtmlEncode(sTargetPage)
     
    Scott, Feb 11, 2006
    #1
    1. Advertising

  2. Scott

    Slim Guest

    try

    Server.URLEncode(url)

    "Scott" <> wrote in message
    news:%...
    > I'm trying to create a link (SEE LINK BELOW) to a pop-up window
    > (myPopUp.asp). My problem is my sTargetPage variable is a url containing a
    > querystring variable. When myPopUp.asp opens and I get my sPage query
    > string value, it returns myTargetpage.asp?qs=1 and clips the 2nd
    > querystring value pair.
    >
    > Can someone help me construct a link so myPopUp.asp preserves the entire
    > query string? I tried using the Server.HtmlEncode comand in "FAILED
    > ATTEMPT" below, but I'm still losing any querystring pairs after the 1st
    > qs pair.
    >
    >
    >
    >
    > PAGE VARIABLE: sTargetPage="myTargetpage.asp?qs=1&qs=2"
    >
    > LINK: http://www.cnn.com/myPopUp.asp?sPage=" & sTargetPage
    >
    > FAILED ATTEMPT: myPopUp.asp?sPage=" & Server.HtmlEncode(sTargetPage)
    >
     
    Slim, Feb 12, 2006
    #2
    1. Advertising

  3. Scott

    Scott Guest

    thx.

    "Slim" <> wrote in message
    news:...
    > try
    >
    > Server.URLEncode(url)
    >
    > "Scott" <> wrote in message
    > news:%...
    >> I'm trying to create a link (SEE LINK BELOW) to a pop-up window
    >> (myPopUp.asp). My problem is my sTargetPage variable is a url containing
    >> a querystring variable. When myPopUp.asp opens and I get my sPage query
    >> string value, it returns myTargetpage.asp?qs=1 and clips the 2nd
    >> querystring value pair.
    >>
    >> Can someone help me construct a link so myPopUp.asp preserves the entire
    >> query string? I tried using the Server.HtmlEncode comand in "FAILED
    >> ATTEMPT" below, but I'm still losing any querystring pairs after the 1st
    >> qs pair.
    >>
    >>
    >>
    >>
    >> PAGE VARIABLE: sTargetPage="myTargetpage.asp?qs=1&qs=2"
    >>
    >> LINK: http://www.cnn.com/myPopUp.asp?sPage=" & sTargetPage
    >>
    >> FAILED ATTEMPT: myPopUp.asp?sPage=" & Server.HtmlEncode(sTargetPage)
    >>

    >
    >
     
    Scott, Feb 12, 2006
    #3
    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. Mehdi
    Replies:
    6
    Views:
    36,174
    sloan
    Apr 6, 2006
  2. news-server.maine.rr.com

    Passing querystring parameters to Frameset -- How?

    news-server.maine.rr.com, Feb 6, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    761
    Frank Milverckowitz
    Feb 6, 2007
  3. =?Utf-8?B?cm9kY2hhcg==?=

    passing a querystring

    =?Utf-8?B?cm9kY2hhcg==?=, Oct 26, 2007, in forum: ASP .Net
    Replies:
    3
    Views:
    444
    Maximiliano
    Oct 27, 2007
  4. Bobby Edward
    Replies:
    3
    Views:
    1,310
    Bobby Edward
    Jan 23, 2009
  5. Adeel Ahmad
    Replies:
    1
    Views:
    561
    Anthony Jones
    Mar 7, 2006
Loading...

Share This Page