473,503 Members | 10,322 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to open a txt file in browser

Hi,
I want to open a text file in notepad when cliked on button or
link in client machine? How to do it?

Thanks you so much in advance

Rabi
--
POST BY: http://www.dotNET.us - Need .NET? Just ask, Please dotNET.us
Nov 19 '05 #1
1 6525
Change the Response Type and the HTTP header.
For example:
Response.ContentType = "application/text";
Response.AddHeader("Content-Disposition",
"attachment;filename=readme.txt");

See more on : http://www.ondotnet.com/pub/a/dotnet...04/01/asp.html
or http://www.eggheadcafe.com/articles/20011006.asp

Lionel.
"RNDAS" <ra**@yahoo.com> a ecrit dans le message de news:
e2**************@TK2MSFTNGP14.phx.gbl...
Hi,
I want to open a text file in notepad when cliked on button or
link in client machine? How to do it?

Thanks you so much in advance

Rabi
--
POST BY: http://www.dotNET.us - Need .NET? Just ask, Please dotNET.us

Nov 19 '05 #2

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

Similar topics

3
6073
by: Jofio | last post by:
Hello, I am a newbie in PHP and I am enthusiastically trying out things. I've just replaced my index.html ( file with index.php
2
4380
by: Lin Ma | last post by:
I have a asp web page with a link point to a file which depend on the database information. Sometime is a picture file sometime a word and some time is a PDF file. For picture file, when user...
18
8814
by: Paul | last post by:
I link to a web site from an Excel spreadsheet. The page i link to is getCookie.asp which sets a cookie then returns back some html which opens a new window, to the same site but a different page...
6
1538
by: Tim Cowan | last post by:
Hi I have the following code to write an error file and it is supposed to open the HTML file in a browser when an error occurs. It creates the file Ok but doesn't open the new browser and doesn't...
10
2064
by: Mariame | last post by:
Hi Everyone How can i make a link in my aspx file open a PDF Files??? Thx in Advance
1
1439
by: Ajay Kumar | last post by:
Hi All, Can any help me how to open any html file(stored file in site) in front page 2003. Like i would be having some link in the site click here to open it in front page 2003. so...
13
8839
by: Daniel Walzenbach | last post by:
Hi, Imagine the following situation: I have an asp.net application which allows uploading files to a SQL Server 2000 database (Files are stored as type "images"). As a next step I would like to...
6
10019
by: qysbc | last post by:
I have a web page and there is a link to open a TIFF file. The way I do it is to have the server code open a binary stream, set the content type to "image/tiff" and call Response.BinaryWrite. On...
0
1351
by: Guern1 | last post by:
Hi Sorry if I have posted this to the wrong forum. Need a bit of help here please to point me in the right direction. I have a java class file here which i wish from a menu item to open a...
2
1273
by: =?Utf-8?B?U29tZXNo?= | last post by:
Hi Friends, I would like to show the Open With dialog of windows (the one which is shown when windows couldn't find the application to open the file) to the user on some specific event. Can...
0
7207
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7294
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,...
1
7015
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7470
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5602
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4693
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3183
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
749
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
403
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.