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 FileSizeDesc(String)String Translates a numeric (Long) value into a file size description.
Example
<%
response.write FileSizeDesc(842371)
' will output "822,63 KB"
%>


Source Code
<%
Function FileSizeDesc(byval lngFSize)
Dim i
Const decimalSeparator = "," ' change this according to your country or needs
i=0
do while lngFSize>1023
   lngFSize = lngFSize/1024: i = i+1
loop
FileSizeDesc=replace(round(lngFSize,2),".",decimalSeparator) & split(" bytes, KB, MB, GB, TB",",")(i)
End Function
%>