Encoding URL Strings in VB.net : URL Encode Decode « Server « ASP.Net






Encoding URL Strings in VB.net

<%@ Page Language="VB" %>
<html>
<head>
   <title>Encoding URL Strings</title>
   <script runat="server">

      Sub UrlPathEncode()

         Dim StrToEncode As String
         Dim StrToReturn As String

         StrToEncode = "UrlPathEncode.aspx? Arg = foo"
         StrToReturn = Server.UrlPathEncode(StrToEncode)
         Response.Write("<a href=""" & StrToReturn & """>" & StrToReturn & "</a>")

      End Sub

   </script>
</head>
<body>

<% UrlPathEncode %>

</body>
</html>

           
       








Related examples in the same category

1.Decoding Encoded HTML Strings (VB.net)
2.Encoding URL Strings (VB.net)
3.Encoding URL Strings in C#
4.Encoding HTML Strings (VB.net)
5.Server.HtmlEncode (VB.net)
6.URL Encode and Decode Demo (VB.net)