asp question about text file

D

Danny

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
 
E

Evertjan.

Danny wrote on 11 dec 2004 in microsoft.public.inetserver.asp.general:
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>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top