"&" in Querystring

  • Thread starter Thread starter Tanmaya Kulkarni
  • Start date Start date
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
 
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 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.
 
Back
Top