I have, basically, copied the example for how to create and download a text file created by my web app, however, I keep getting an error on the last line that is supposed to download the file… that is:
“You must use the value returned by this function”
What am I missing here?
TextFile = New WebFile // TextFile is a property of the web page
TextFile.MimeType = “text/plain”
TextFile.ForceDownload = True // If False, the browser may try to display the file instead of download it
TextFile.FileName = “client_email.csv”
var emails as RecordSet = session.data.SqlSelect(“Select FIRST_NAME, LAST_NAME, EMAIL FROM CLIENTS where ACTIVE = ‘True’”)
var nline as string=""
while not emails.eof
nline=emails.Field(“FIRST_NAME”).StringValue + “,” + emails.Field(“LAST_NAME”).StringValue + “,” + emails.Field(“EMAIL”).StringValue
txtFiles.Text=txtFiles.text + nline
TextFile.Data = txtFiles.Text