I am generating a text file via ASP. I want to display a 'Save As' dialog box to the user instead of just opening the text file within the browser. I have found a few examples on the web such as:
Response.AppendHeader("content-disposition", "attachment; filename=test.txt")
Response.ContentType = "text/plain"
Response.WriteFile("c:/inetpub/Response.Flush()
All the examples I have found use a variation on the above 'AppendHeader' line, but my browser keeps giving me the following error (referring to that line):
'Cannot use parentheses when calling a Sub'
Any help would be appreciated!
THanks.
Response.AppendHeader("content-disposition", "attachment; filename=test.txt")
Response.ContentType = "text/plain"
Response.WriteFile("c:/inetpub/Response.Flush()
All the examples I have found use a variation on the above 'AppendHeader' line, but my browser keeps giving me the following error (referring to that line):
'Cannot use parentheses when calling a Sub'
Any help would be appreciated!
THanks.