Re: Special Characters in Query String
- From: "Joerg Jooss" <news-reply@xxxxxxxxxxxxx>
- Date: Sat, 07 May 2005 11:10:00 -0700
Kim Bach Petersen wrote:
> SMG wrote:
>
> > But when I have special characters like [ABC&D] then the value
> > retrieved is wrong it just retrieves ABC and not complete ID [ABC&D]
> > value to be passed : ABC&D
> > http://localhost/myProj/abc.aspx?ScripID=ABC&D
> >
> > how do I overcome this, I know I can do it like we have %20 for
> > space and like wise for & there will be something, but this will be
> > a major change to my application, can I do this at one end some
> > where in web.config or in aspx page?
>
> You have to UrlEncode the string you are passing as a querystring:
>
> strQuery = HttpUtility.UrlEncode(strQuery,
> System.Text.Encoding.Default)
I suggest using a more web-friendly encoding than some Windows specific
default, e.g. ISO-8859-1 or UTF-8.
Cheers,
--
http://www.joergjooss.de
mailto:news-reply@xxxxxxxxxxxxx
.
- Follow-Ups:
- Re: Special Characters in Query String
- From: Kim Bach Petersen
- Re: Special Characters in Query String
- References:
- Special Characters in Query String
- From: SMG
- Re: Special Characters in Query String
- From: Kim Bach Petersen
- Special Characters in Query String
- Prev by Date: Re: Image quality on generated images
- Next by Date: Re: Special character to &abc equivalents
- Previous by thread: Re: Special Characters in Query String
- Next by thread: Re: Special Characters in Query String
- Index(es):
Relevant Pages
|
Loading