Forum Moderators: open

Message Too Old, No Replies

Decoder function for URLEncode method

i need a function to decode data encoded with server.urlencode

         

abulhallaj

8:54 am on Feb 8, 2005 (gmt 0)

10+ Year Member



Hi to all

I need a function to decode data encoded with Server.URLEncode or Server.HTMLEncode method

musicales

9:01 am on Feb 8, 2005 (gmt 0)

10+ Year Member



Here's a cunning way I found in standard asp. It works even if you use vbscript in the rest of the page. You can call it from your vbscript asp as you would a normal vbscript function:

<script language=JavaScript RUNAT=SERVER>
// This function decodes the any string
// that's been encoded using URL encoding technique
function URLDecode(psEncodeString)
{
return unescape(psEncodeString);
}
</script>

so then you just do

<%response.write URLDecode("blahblah")%>

abulhallaj

4:46 pm on Feb 8, 2005 (gmt 0)

10+ Year Member



Thanks

I will try this