Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > asp question about text file

Reply
Thread Tools

asp question about text file

 
 
Danny
Guest
Posts: n/a
 
      12-11-2004
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


 
Reply With Quote
 
 
 
 
Evertjan.
Guest
Posts: n/a
 
      12-11-2004
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>


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I tell the difference between the end of a text file, and an empty line in a text file? walterbyrd Python 7 05-17-2007 06:02 AM
Re: text file search to text file output possible? Whiskers Computer Support 3 10-07-2006 06:32 PM
Re: text file search to text file output possible? Mitch Computer Support 0 10-06-2006 11:15 PM
Controlling text in a Text Area or Text leo ASP General 1 12-05-2005 01:13 AM
Read Text File and split them to individual text file Krish ASP .Net 1 10-20-2005 03:39 PM



Advertisments