DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: (Un)escape function

  1. #1
    Chris Guest

    (Un)escape function


    Hi,

    Does anyone know if there are ASP equivalents of the Javascript functions
    escape and unescape. These functions turn a string to and from their hex/ascii
    equivalents.

    E.g.
    escape("test string") = "test%20string"
    unescape("test%20string") = "test string"

    I am in the process of writing these functions, but don't want to waste time
    if they already exist, etc.

    Thanks,
    Chris

  2. #2
    Russell Jones Guest

    Re: (Un)escape function

    See the Server.URLEncode and Server.HTMLEncode methods. Also, you can
    include a Javascript function on the page (even if the primary language for
    the page is VBScript), e.g.

    <script language="JScript" runat="Server">
    Response.write(unescape("test%20string") + "<br>");
    Response.write(escape("test string") + "<br>");
    </script>



    "Chris" <c_j_gregory@hotmail.com> wrote in message
    news:3a812a77$1@news.devx.com...
    >
    > Hi,
    >
    > Does anyone know if there are ASP equivalents of the Javascript functions
    > escape and unescape. These functions turn a string to and from their

    hex/ascii
    > equivalents.
    >
    > E.g.
    > escape("test string") = "test%20string"
    > unescape("test%20string") = "test string"
    >
    > I am in the process of writing these functions, but don't want to waste

    time
    > if they already exist, etc.
    >
    > Thanks,
    > Chris




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center