I was doing more research about the Webfile and tried it. The point is why does the compiler complain about it. I’m against a deadline and thought this might get more views as it’s a different heading.
That is creating a text file and it compiles. The example doesn’t mention anything about downloading a binary file.
If TextFile = Nil Then
// Create a text file to download
TextFile = New WebFile
TextFile.MimeType = "text/plain"
TextFile.ForceDownload = True
TextFile.FileName = "TextFile.txt"
Dim d As New Date
d.GMTOffset = Session.GMTOffset
TextFile.Data = "Hello World to " + Session.RemoteAddress + " at " + d.ShortDate + " " + d.ShortTime
// The WebFile.Downloaded event handler is called when the browser
// requests the file for downloading. This code maps that event handler
// to the FileDownloaded method on this web page.
AddHandler TextFile.Downloaded, AddressOf FileDownloaded
// Showing the URL prompts the browser to download it