> Here are the story .
> Say .
> I had a old ASP site like "http://1.2.3.4/1.asp?Action=XX";
> and it taks the Query string to enable some functions then 
> return Data.
> 
> But now the problem comes.
> about the Action's value , It take Big5 data as input 
> paramater. like "http://1.2.3.4/1.asp?Action=½T»{";
> 
> SO when I try to use the HttpWebRequest to access the site. 
> HttpWebRequest login = (HttpWebRequest)HttpWebRequest.Create
> ("http://1.2.3.4/1.asp?Action=½T»{";);
> It can't never work .

        true, because you use illegal characters in the URL. All characters in an URL 
have to lay in the ascii range 33-127, with some exceptions. All characters above that 
or f.e. unicode characters have to be encoded, like you used to do with 
System.UrlEncode or similar method in the old system object in ASP. You should use 
that kind of encoding now too. It's transparent, the webserver will decode the encoded 
url characters back and you will never notice in your code the url was in fact 
urlencoded. 

        Use the System.Web.HttpUtility class with its method UrlEncode() to encode a 
non-HTTP compliant string to a usable URL. Pass that url to the Create() method. 

        FB

=======  You can't sell what's free  ==================================
Senior Software Engineer @ Solutions Design :  http://www.sd.nl
Get my free, open source .NET software at   :  http://www.sd.nl/software
======================================================================= 

Reply via email to