471,321 Members | 2,212 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,321 software developers and data experts.

"&" 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 1430
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
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.