UrlEncode-ing System.Web.HttpCookie values

C

Chris

Just a curiosity:

Is it standard practice to UrlEncode and UrlDecode cookie values? I
wouldn't have even stumbled across this except I noticed that when I
retrieve a cookie that was set with ASP and had an asterisk in it, ASP
UrlEncoded it ("%2A"). I was forced to UrlDecode the cookie in my
ASPX page. As the Values collection is a NameValueCollection (not
directly related to the HttpCookie class), I can understand that
adding a value in .NET would do it verbatim ("*").

Not a big deal, but is it "standard" to UrlEncode strings before
adding them to the .Values NameValueColection of a HttpCookie?
 

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,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top