Querystring and Double-Byte characters

Discussion in 'ASP .Net' started by RodBillett, Aug 30, 2004.

  1. RodBillett

    RodBillett Guest

    I have an ASP.NET web page that accepts querystring parameters.


    MyPage.aspx?DB=__??????????&ID=1


    When I get into the page and look at Request.Querystring it shows as

    "DB=__%3f%3f%3f%3f%3f%3f%3f%3f%3f%3f&ID=1"

    How can I get the correct Double-Byte character representation in the
    QueryString?

    Web.Config has both the request and response encoding as utf-8.

    The site that is working w/o problems and I am trying to add in some simple
    integration techniques. If they access the page from another of the sites
    pages, the querystring is constructed as follows


    string parms "parm1|parms2|parm3";

    <Convert parms to a Base64 Array>

    string navigateURL = "Mypage.aspx?parms=" + HttpUtility.URLEncode( parms )

    In the page_Load I can unpack the quesrystring and get the correct values,
    but if a user just tries to access the site with 'simple integration' then
    they get _?????? for the parms

    Any Help would be appreciated

    Rod
     
    RodBillett, Aug 30, 2004
    #1
    1. Advertising

  2. RodBillett

    Mark Harris Guest

    Try: Server.UrlDecode();

    Should fix your problems as what is getting displayed is just the url
    encoded version :)

    - Mark

    On Mon, 30 Aug 2004 12:35:49 -0600, RodBillett <> wrote:

    > I have an ASP.NET web page that accepts querystring parameters.
    >
    >
    > MyPage.aspx?DB=__??????????&ID=1
    >
    >
    > When I get into the page and look at Request.Querystring it shows as
    >
    > "DB=__%3f%3f%3f%3f%3f%3f%3f%3f%3f%3f&ID=1"
    >
    > How can I get the correct Double-Byte character representation in the
    > QueryString?
    >
    > Web.Config has both the request and response encoding as utf-8.
    >
    > The site that is working w/o problems and I am trying to add in some
    > simple
    > integration techniques. If they access the page from another of the
    > sites
    > pages, the querystring is constructed as follows
    >
    >
    > string parms "parm1|parms2|parm3";
    >
    > <Convert parms to a Base64 Array>
    >
    > string navigateURL = "Mypage.aspx?parms=" + HttpUtility.URLEncode( parms
    > )
    >
    > In the page_Load I can unpack the quesrystring and get the correct
    > values,
    > but if a user just tries to access the site with 'simple integration'
    > then
    > they get _?????? for the parms
    >
    > Any Help would be appreciated
    >
    > Rod
    >
    >




    --
    Mark Harris
    Head Developer
    GameHost CP
     
    Mark Harris, Aug 30, 2004
    #2
    1. Advertising

  3. RodBillett

    Joerg Jooss Guest

    RodBillett wrote:
    > I have an ASP.NET web page that accepts querystring parameters.
    >
    >
    > MyPage.aspx?DB=__??????????&ID=1
    >
    >
    > When I get into the page and look at Request.Querystring it shows as
    >
    > "DB=__%3f%3f%3f%3f%3f%3f%3f%3f%3f%3f&ID=1"
    >
    > How can I get the correct Double-Byte character representation in the
    > QueryString?
    > Web.Config has both the request and response encoding as utf-8.


    Since UTF-8 is not a double byte character encoding (it uses one or more
    bytes): never ;-) %3f% is the question mark, the encoded values are correct.
    It must break before that.

    > The site that is working w/o problems and I am trying to add in some
    > simple integration techniques. If they access the page from another
    > of the sites pages, the querystring is constructed as follows
    >
    >
    > string parms "parm1|parms2|parm3";
    >
    > <Convert parms to a Base64 Array>
    >
    > string navigateURL = "Mypage.aspx?parms=" + HttpUtility.URLEncode(
    > parms )
    >
    > In the page_Load I can unpack the quesrystring and get the correct
    > values, but if a user just tries to access the site with 'simple
    > integration' then they get _?????? for the parms


    How does this "integration" actually work? Do the users click on some
    hyperlink in your web app, or in another web app?

    Cheers,

    --
    Joerg Jooss
     
    Joerg Jooss, Aug 31, 2004
    #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. Harald Hein
    Replies:
    1
    Views:
    3,696
    Soefara
    Nov 18, 2003
  2. John O'Conner
    Replies:
    2
    Views:
    363
    John O'Conner
    Nov 19, 2003
  3. Sydex
    Replies:
    12
    Views:
    6,501
    Victor Bazarov
    Feb 17, 2005
  4. jeko

    reading a double var byte per byte

    jeko, Jan 18, 2005, in forum: C Programming
    Replies:
    12
    Views:
    551
  5. Deep
    Replies:
    6
    Views:
    492
    Nick Keighley
    Feb 28, 2007
Loading...

Share This Page