473,322 Members | 1,736 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Cookies from an ASP page coming in weird

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

Nov 18 '05 #1
2 1230
This is normal character encoding. Use Server.URLEncode and
Server.URLDecode to encode/decode the special characters.
"Chris" <cf@NoSpamzieQuotepro.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
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

Nov 18 '05 #2
"Chris" <cf@NoSpamzieQuotepro.com> wrote in news:#F5uA5N9DHA.2944
@TK2MSFTNGP11.phx.gbl:
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.
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"
Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: kublai khan | last post by:
I am coming from (an elementary-level) javascript background. I set cookiesin select pages to see where the users are coming from and where they are going. It works quite nicely except that I'd...
1
by: Matt Smith | last post by:
Please oh please oh please can someone with some P3P knowledge help me out? I'm aware that this isn't strictly an ASP or IIS issue but the SSL groups listed on my news server appear abandoned and...
6
by: Mark | last post by:
Hi... I've come across some weird bug with Response.Cookies. Or maybe it will be called "by design" but for the life of me I can't figure out what purpose it would serve. If you're setting a...
6
by: Nicolae Fieraru | last post by:
Hi All, I recently discovered that my session cookies on the web host disappear within 30 seconds. I created some very simple asp scripts (it took me a while until I discovered why my shopping...
1
by: David M. Gauntt | last post by:
I have been testing some javascript for my professional society web page, and found that I couldn't get Safari to save any cookies. No matter what I assign to document.cookie, I get an empty...
1
by: Andrew Parsons | last post by:
Hi all, I had a weird issue with trying to use a cookie in a ASCX housed on my web forms and I was wondering if I am missing something. I wanted to use the authenticated cookie for the user...
4
by: mike parr | last post by:
I'm trying to do a check to see if the client browser has cookies enabled. But my code below always gives me the value for acceptsCookies = true, whether the machine has cookies enabled or not. ...
5
by: Kevin Blount | last post by:
I've setup a method (C#) that I can call, passing it a cookie name, then a name-value pair. The idea is that as I can't append to a cookie, I read the cookie value, append by name=pair to the end...
3
by: Shashank | last post by:
Hi all, I am making a http request to a html page residing on a server through a desktop application . The page is actually an html page with some perl queries on the top. For this page I have...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.