468,766 Members | 1,295 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,766 developers. It's quick & easy.

"&" in Querystring

Hi,

I need to pass a string having ampersand "&" in the query string like
Company=Johnson&Johnson.

How do I send it and receive it?

TIA,
Tanmaya
Jun 19 '06 #1
3 1356
easy :)

you need to Encode the String

Respose.Redirect( "myPage.aspx?name=" & Server.URLEncode( myLabel.Text ) )

and then you can use

myLabel.Text = Server.URLDecode( request.QueryString("name") )

--

Bruno Alexandre
(a Portuguese in Københanv, Danmark)
"Tanmaya Kulkarni" <ta**************@persistent.co.in> escreveu na mensagem
news:OY**************@TK2MSFTNGP04.phx.gbl...
Hi,

I need to pass a string having ampersand "&" in the query string like
Company=Johnson&Johnson.

How do I send it and receive it?

TIA,
Tanmaya

Jun 19 '06 #2
Go the Answer,

Add a %26 instead of &

"Tanmaya Kulkarni" <ta**************@persistent.co.in> wrote in message
news:OY**************@TK2MSFTNGP04.phx.gbl...
Hi,

I need to pass a string having ampersand "&" in the query string like
Company=Johnson&Johnson.

How do I send it and receive it?

TIA,
Tanmaya

Jun 19 '06 #3
Bruno Alexandre wrote:
easy :)

you need to Encode the String

Respose.Redirect( "myPage.aspx?name=" & Server.URLEncode( myLabel.Text ) )

and then you can use

myLabel.Text = Server.URLDecode( request.QueryString("name") )


Actually you shouldn't decode the value. That is done automatically.
Jun 20 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Arpan | last post: by
4 posts views Thread by barney | last post: by
5 posts views Thread by martin | last post: by
2 posts views Thread by Mehdi | last post: by
5 posts views Thread by chortler | last post: by
2 posts views Thread by beachboy | last post: by
1 post views Thread by EoRaptor013 | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.