Function WriteToFile(FileName, FileContent)
' This function creates a file which file name is FileName
' and file content is as Filecontent
'Start process
If FileName <> "" Then
'Create and write to a File
Dim FileObj
Set FileObj = Server.CreateObject("Scripting.FileSystemObject")
Dim MyFile
'Response.Write("file name = " & FileName & "<br>")
Set MyFile = FileObj.CreateTextFile(FileName)
Dim I
For I = 1 To LenB(FileContent)
MyFile.Write Chr(AscB(MidB(FileContent, I, 1)))'******* line 39********
Next
MyFile.Close
WriteToFile = True
Else
WriteToFile = False
End If
End Function