Main Software ActiveX ASP Source Downloads Android Contact
ASP

Here you can find some FREE usefull Classic ASP / VBScript code snippets, class modules, etc.
I use then myself on most of my projects, so you can rest assured they were optimized over time and are very reliable.
You can use them on your personal or commercial projects.
If you find them usefull to you, please make a donation (nomatter how small) to help me keep this content online for free.


Encode and Decode String File IO Misc
Base-64
HTML2Text
Recaptcha
SHA-1
Text2HTML
Escape
FileNameIn
FileSizeDesc
Format
RemoveTags
BinReadFile
CreateFolder
FileDateTime
FileExists
FileLen
FolderExists
GetFiles
GetFolders
ReadFile
IsValidEmail
SendCDOMail
ScanVar
Function HTML2Text(String)String Converts a HTML encoded String into plain text.
Example
<%
Dim textValue
textValue = HTML2Text("Smith&nbsp;&amp;&nbsp;Son&nbsp;&copy;")
' This will return in plain text "Smith & Son ©"
%>


Source Code
<%
Function HTML2Text(htmlData)
Dim i, c, htmlChars
htmlChars = Split(",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,&nbsp;,,&quot;" & _
   ",,,,&amp;,,,,,,,,,,,,,,,,,,,,,,&lt;,,&gt;,,,,,,,,,,,,,,,,," & _
   ",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,," & _
   ",,,,,,,,,,,,,,,,,,,,,,,&nbsp;,&iexcl;,&cent;,&pound;,&curren;" & _
   ",&yen;,&brvbar;,&sect;,&uml;,&copy;,&ordf;,&laquo;,&not;," & _
   "&shy;,&reg;,&macr;,&deg;,&plusmn;,&sup2;,&sup3;,&acute;," & _
   "&micro;,&para;,&middot;,&cedil;,&sup1;,&ordm;,&raquo;,&frac14;" & _
   ",&frac12;,&frac34;,&iquest;,&Agrave;,&Aacute;,&Acirc;,&Atilde;" & _
   ",&Auml;,&Aring;,&AElig;,&Ccedil;,&Egrave;,&Eacute;,&Ecirc;," & _
   "&Euml;,&Igrave;,&Iacute;,&Icirc;,&Iuml;,&ETH;,&Ntilde;,&Ograve;" & _
   ",&Oacute;,&Ocirc;,&Otilde;,&Ouml;,&times;,&Oslash;,&Ugrave;," & _
   "&Uacute;,&Ucirc;,&Uuml;,&Yacute;,&THORN;,&szlig;,&agrave;," & _
   "&aacute;,&acirc;,&atilde;,&auml;,&aring;,&aelig;,&ccedil;," & _
   "&egrave;,&eacute;,&ecirc;,&euml;,&igrave;,&iacute,&icirc;," & _
   "&iuml;,&eth;,&ntilde;,&ograve;,&oacute;,&ocirc;,&otilde;,&ouml;" & _
   ",&divide;,&oslash;,&ugrave;,&uacute;,&ucirc;,&uuml;,&yacute;," & _
   "&thorn;,&yuml;", ",")
HTML2Text = htmlData
For i = 0 To UBound(htmlChars)
   c = htmlChars(i)
   If c > "" Then
      If InStr(HTML2Text, c) > 0 Then HTML2Text = Replace(HTML2Text, c, Chr(i))
   End If
Next
ReDim htmlChars(0): Erase htmlChars
End Function
%>