Querystring and Double-Byte characters

R

RodBillett

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
 
M

Mark Harris

Try: Server.UrlDecode();

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

- Mark
 
J

Joerg Jooss

RodBillett said:
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,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top