V
Vance Kessler
We are trying write a new ASP.NET page to work with an existing
stateless ASP application. The ASP application creates a cookie and
of course stores the cookie values as escaped strings (using the
vbscript escape function). I am have a terrible time 'unescaping'
that string with C# under ASP.NET.
I have tried the following:
HttpUtility.UrlDecode
HttpUtility.HtmlDecode (this should not work but I tried it)
System.Web.HttpContext.Current.Server.UrlDecode
System.Web.HttpContext.Current.Server.HtmlDecode (tried this too)
They all return the same string back or a slightly unescaped version.
Is there something about the way VBScript's escape works that is not
compatible with UrlDecode? Is there something about accessing this
through HttpCookie that changes things? Will I have to write my own
function to decode this or is there some other functions I can access
that will do this?
Thanks
stateless ASP application. The ASP application creates a cookie and
of course stores the cookie values as escaped strings (using the
vbscript escape function). I am have a terrible time 'unescaping'
that string with C# under ASP.NET.
I have tried the following:
HttpUtility.UrlDecode
HttpUtility.HtmlDecode (this should not work but I tried it)
System.Web.HttpContext.Current.Server.UrlDecode
System.Web.HttpContext.Current.Server.HtmlDecode (tried this too)
They all return the same string back or a slightly unescaped version.
Is there something about the way VBScript's escape works that is not
compatible with UrlDecode? Is there something about accessing this
through HttpCookie that changes things? Will I have to write my own
function to decode this or is there some other functions I can access
that will do this?
Thanks