Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > URL Decode HTML encoded in JavaScript

Reply
Thread Tools

URL Decode HTML encoded in JavaScript

 
 
Ben Amada
Guest
Posts: n/a
 
      09-30-2005
Hello. I have some HTML that I would like to pass to a popup webform via a
querystring. I've run into some problems which I believe is because I need
to encode the HTML. The popup webform is being created via JavaScript so I
need to use JavaScript to encode the HTML. The problem is that I'm not sure
if the URLDecode function in .NET is fully compatible with the encoding
function in JavaScript.

I found the following two JavaScript encoding functions:

escape(param)
encodeURI(param)

I'm leaning towards using encodeURI as it is a newer, and probably more
reliable function. Has anyone used the encodeURI function before with
..NET's URLDecode function? Do they work well with each other??

TIA,
Ben


 
Reply With Quote
 
 
 
 
Ben Amada
Guest
Posts: n/a
 
      09-30-2005
Ben Amada wrote:

> escape(param)
> encodeURI(param)
>
> I'm leaning towards using encodeURI as it is a newer, and probably more
> reliable function.


After some more testing, it seems as though the 'escape' function works
better. Specifically with a # sign, encodeURI doesn't encode it at all
which is giving me problems. 'escape', on the other hand, properly encodes
the # to %23.

So I guess my question now is, is .NET's URLDecode function fully compatible
with JavaScript's 'escape' function? Is anyone else using anything else
besides 'escape' that they've found works better?

Thanks once again,
Ben


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to decode this partially encoded string? John Dalberg ASP .Net 2 03-08-2007 06:27 PM
decode base64 encoded login info Mr. T ASP .Net 1 03-05-2007 03:47 PM
decode base64 encoded login info Mr. T ASP .Net Security 0 03-05-2007 03:16 PM
Can I decode the content with java which is encoded with DESCryptoServiceProvider wolf ASP .Net 0 03-20-2005 06:14 PM
How do i decode an ISO-8859-1 encoded text file? SHIRE Java 4 02-04-2004 04:03 PM



Advertisments