hi
i am try to use this code but the record on the file after download is empty way
Var f As FolderItem
//Dim txtFile As WebFile
f = SpecialFolder.Temporary.Child(“MyTextFile.txt”) // Create in a temporary folder
Var s As String
Var listDta() As String
txtFile=New WebFile
txtFile.ForceDownload=True
txtFile.MimeType = “text/plain”
txtFile.Filename = f.Name
If f <> Nil Then
Var t As TextOutputStream = TextOutputStream.Create(f)
//// Write content to the file
try
t.write(“test1”)
t.write(“test2”)
t.Close
//// Set the WebFile properties
Catch e As IOException
MsgBox e.Message
end try
// Show the file for download
ShowURL(txtFile.URL)
End If
6 posts - 2 participants