Board index » Web Programming » asp question about text file

asp question about text file

Web Programming386
I wrote an asp program that displays some information line by line such as

name, address, town, state, zip



and it prints about 200 lines to their browsers when the asp file is called.

It is comma delimted so they can import into their database using access for

example.



1. when they do file-save as to a txt file, it does not import right for

them. It seems the lines blend into each other.



1. the only way they can do it is if they view the source code, then save as

txt file. then when they import into access, it parses right.



odd, what can i do on my asp end to make sure they can just do a file save

as right from browser instead of viewing source.



Thanks


-
 

Re:asp question about text file

Danny wrote on 11 dec 2004 in microsoft.public.inetserver.asp.general:



Quote
I wrote an asp program that displays some information line by line

such as name, address, town, state, zip



and it prints about 200 lines to their browsers when the asp file is

called. It is comma delimted so they can import into their database

using access for example.



1. when they do file-save as to a txt file, it does not import right

for them. It seems the lines blend into each other.



1. the only way they can do it is if they view the source code, then

save as txt file. then when they import into access, it parses right.



odd, what can i do on my asp end to make sure they can just do a file

save as right from browser instead of viewing source.



The simlest way is to enclose the content into <pre>... </pre>, as an

ASP file is normally rendered and viewed as a HTML file on the client

side.



The second way is to send it as a .txt file



The third and most sofisticaeted way is to send it as a binary streem

with a special content-disposition allowing only a "save as".



Response.AddHeader "Content-Disposition","attachment; filename=" & fn

<http://www.aspfaq.com/show.asp?id=2161" rel="nofollow" target="_blank">www.aspfaq.com/show.asp>





--

Evertjan.

The Netherlands.

(Please change the x'es to dots in my emailaddress)

-