"&" in Querystring

T

Tanmaya Kulkarni

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
 
B

Bruno Alexandre

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") )
 
?

=?ISO-8859-1?Q?G=F6ran_Andersson?=

Bruno said:
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.
 

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

Similar Threads


Top