is it possible to create a text file "on the fly" and then ask the client to download it?
i only have two options available to me: 1. javascript 2. asp classic
which of these 2 can do this?
is it possible to create a text file "on the fly" and then ask the client to download it?
i only have two options available to me: 1. javascript 2. asp classic
which of these 2 can do this?
You can use classic ASP by creating a text file on disk then redirecting to the text file. Note that the file in this example test.txt
is created in the folder where the page lives (E.G., \inetpub\wwwroot, etc.)
<%
Dim fs, fname
Set fs = Server.CreateObject("Scripting.FileSystemObject")
Set fname = fs.CreateTextFile(Server.MapPath("test.txt"), true)
fname.WriteLine("Hello World!")
fname.Close
Set fname = Nothing
Set fs = Nothing
Response.Redirect("text.txt")
%>