Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: Download file


Message #1 by "Shumaila" <sh_naeem@h...> on Fri, 23 Mar 2001 19:53:01
Hello



I want to give user a link on clicking which the user would get the MS IE 

Standard dialog box saying 'open it' or 'save it'? After the user click on 

Save it the file should be saved as CSV (Comma Separated Values) in a file 

on clients machine. Now in the link the file is .asp It would give the 

result after compiling it self on the server. 



How could i do this. 



One idea i have is when user click on the link, a new browser is opened 

and in the background a new file is created using filesystem object. The 

docuemnt is then referenced to that file and a save as dialog appears. As 

soon as the user saves it the browser closes. 



Now the question is how to reference the document to that file ? and how 

to create that file on the server. I have tried the simple code



	Set FO = CreateObject("Scripting.FileSystemObject")

	set fs = FO.CreateTextFile(".\a.txt",TRUE)

	fs.writeline("Dummy line")

	fs.close



Now no file is created and no error i got. Funny 

please help



Thank in advanceI am using Windows NT 4 and my question is how could i 

keep my TN Explorer in the same view mode. Like for example i want to 

specify detail view for director A and Small folder for Directroy B. 



Every time i got to directory A, i have to change the visual file mode (to 

view the files and folders according to my will). 



In windows you could acheive this by changing the view mode to desired 

style and then closing the Windows browser. Now if you will open it and go 

to that directory, i will be like the way you set it. 



Shumaila

  Return to Index