473,385 Members | 1,901 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

asp question about text file

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
Jul 22 '05 #1
1 1114
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)
Jul 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: flamesrock | last post by:
ok, so to my knowledge, object oriented means splitting something into the simplest number of parts and going from there. But the question is- when is it enough? For example I have the following...
2
by: seia0106 | last post by:
Hello I am writing a function to read a binary file. Here is a part of code #include <fstream> .. .. BYTE *pData; long lDataLen; pms->GetPointer(&pData); lDataLen = pms->GetSize(); // Read...
125
by: Sarah Tanembaum | last post by:
Beside its an opensource and supported by community, what's the fundamental differences between PostgreSQL and those high-price commercial database (and some are bloated such as Oracle) from...
2
by: James | last post by:
Hi, I have a dos program that creates data files which are used in another program that is written by the same company. I am trying to figure out how I can read the data from the data files. ...
55
by: Sharon | last post by:
hi all, I generate binary text file (in Windows using Dev-C++) Is the generated binary file using BigEndian? Are there any method to generate binary file using LittleEndian? Because I want the...
2
by: David Buchan | last post by:
I have written a program to write some text to a file. Currently, if the file already exists, the program simply overwrites it. What I'd like to do, is have the program ask me if I wish to...
10
by: Rider | last post by:
Hi, simple(?) question about asp.net configuration.. I've installed ASP.NET 2.0 QuickStart Sample successfully. But, When I'm first start application the follow message shown. ========= Server...
1
by: Kenneth McDonald | last post by:
I am going to demonstrate my complete lack of understanding as to going back and forth between character encodings, so I hope someone out there can shed some light on this. I have always...
28
by: SpreadTooThin | last post by:
I'm really worried that python may is doing some things I wasn't expecting... but lets see... if I pass a list to a function def fn(myList): and in that function I modify an element in the...
3
by: Gary | last post by:
Hi in a simple application that consists of a couple of user input forms. I'm wondering what the difference is between using a database technology and a plain text file? I've been working on...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.