Cookies from an ASP page coming in weird

C

Chris

I have an aspx page that is called from an asp page. When I read the
httpcookie in asp.net I get the dashes and slashes converted to a "%3" and
such. Is there was way to convert it back to normal or am I reading in the
cookie the wrong way?

This is how I am reading it in

WorkDir = Request.Cookies("ibWDIR")
SessionID = Request.Cookies("ibGUID")
If Not WorkDir Is Nothing Then TextBox1.Text = WorkDir.Value
If Not SessionID Is Nothing Then TextBox2.Text = SessionID.Value

This is how I write it form the asp page

Response.Cookies("ibGUID") = "{56C17EC3-0746-4846-B4EB-7C71FE0948CB}"
Response.Cookies("ibWDIR") = "f:\ibits\illinois\working"

Is there an easier/better way to do this?

Chris
 
C

Chad Z. Hower aka Kudzu

Chris said:
I have an aspx page that is called from an asp page. When I read the
httpcookie in asp.net I get the dashes and slashes converted to a "%3" and
such. Is there was way to convert it back to normal or am I reading in the
cookie the wrong way?

Special characters have to be encoded for HTTP/HTML transmission. Look at
System.Decode.
 
S

Scott M.

This is normal character encoding. Use Server.URLEncode and
Server.URLDecode to encode/decode the special characters.
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top