473,320 Members | 1,804 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,320 software developers and data experts.

Sending a TXT file to a browser client

ko
Hi all!

I dunno how to do this

1. User presses button on webpage

2. ASP.NET app prepares a TXT file

3. Send TXT file to user (not in the browser window, but with the usual
open/save dialog)

How can i do step 3? Could someone post some code, please?

Thanx

Bye

Nov 17 '05 #1
2 1339
set the MIME type to octet-stream:

http://www.ondotnet.com/pub/a/dotnet...04/01/asp.html

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
"ko" <ok@ko.com> wrote in message
news:00********************@news2.tin.it...
Hi all!

I dunno how to do this

1. User presses button on webpage

2. ASP.NET app prepares a TXT file

3. Send TXT file to user (not in the browser window, but with the usual
open/save dialog)

How can i do step 3? Could someone post some code, please?

Thanx

Bye

Nov 17 '05 #2
ko
> set the MIME type to octet-stream:

http://www.ondotnet.com/pub/a/dotnet...04/01/asp.html


Thanx Craig, it works. But I have a little problem, if I select Open instead
of download, the download windows, closes, then opens again and I have to
select Open again to see the txt file in notepad...

Any ideas?

Thanx
Nov 17 '05 #3

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

Similar topics

20
by: CHIN | last post by:
Hi all.. here s my problem ( maybe some of you saw me on other groups, but i cant find the solution !! ) I have to upload a file to an external site, so, i made a .vbs file , that logins to...
5
by: vanisathish | last post by:
Hi All, I need to constantly update some values to the User Interface. In order to do the updation efficiently, i am planning to run some script in the server side that constantly keeps sending...
0
by: Buddy Ackerman | last post by:
I'm sending file to the client (see sample code below) but when I send a large file the user gets a document contains no data message. response.contenttype = "application/x-unknown" myheader =...
0
by: Buddy Ackerman | last post by:
I'm sending file to the client (see sample code below) but when I send a large file the user gets a document contains no data message. response.contenttype = "application/x-unknown" myheader =...
7
by: D. Patrick | last post by:
I need to duplicate the functionality of a java applet, and how it connects to a remote server. But, I don't have the protocol information or the java source code which was written years ago. ...
3
by: bryu1 | last post by:
Hello, I'm trying to find a way for a web page to do some file processing in the client side before sending it to a server. Is there a way to do that in php (or in some other language)? ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.