473,326 Members | 2,732 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,326 software developers and data experts.

ASP - Launching Notepad.exe Client-side

Hi,

I have Googled the internet beyond belief for a solution to this and keep running into obstacles:

I have written an ASP application using our IIS server which retrieves data and displays them in a nice grid. My boss wants the application to create a .txt file of this data when a button is clicked and then open Notepad with this new file so that it can be saved locally on a user's harddrive.

I can create the file itself fine, but trying to launch Notepad client-side with this new .txt file has proven to be an absolute nightmare. It is a nightmare because I've gotten errors such as from "Automation server can't create object" to others that are a constant, annoying road-block to what seems to me ought to be a simple trick.

Bottom line, how do I do the above without getting errors (opening Notepad with the file created)? Again, Notepad is what my boss wants used, so with that I need to know the solution with ASP (not ASP .NET). Thanks!
Aug 14 '06 #1
2 7712
Sp***************@comcast.net wrote:
Hi,

I have Googled the internet beyond belief for a solution to this and
keep running into obstacles:

I have written an ASP application using our IIS server which
retrieves data and displays them in a nice grid. My boss wants the
application to create a .txt file of this data when a button is
clicked and then open Notepad with this new file so that it can be
saved locally on a user's harddrive.

I can create the file itself fine, but trying to launch Notepad
client-side with this new .txt file has proven to be an absolute
nightmare. It is a nightmare because I've gotten errors such as from
"Automation server can't create object" to others that are a
constant, annoying road-block to what seems to me ought to be a
simple trick.

Bottom line, how do I do the above without getting errors (opening
Notepad with the file created)? Again, Notepad is what my boss wants
used, so with that I need to know the solution with ASP (not ASP
.NET). Thanks!

Check a client-side scripting newsgroup such as
microsoft.public.scripting.jscript*, but I doubt you will get much help
unless you consider using HTA (hypertext application). Security
restrictions will prevent ordinary browser pages from launching external
applications.
* your question has nothing to do with ASP which is a server-side
technology that simply generates html to be sent to the client
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Aug 14 '06 #2
Sp***************@comcast.net wrote:
I have written an ASP application using our IIS server which
retrieves data and displays them in a nice grid. My boss wants
the application to create a .txt file of this data when a
button is clicked and then open Notepad with this new file
so that it can be saved locally on a user's harddrive.
Assuming you have an ASP script that outputs the desired text, what happens
if you send content-type "text/plain"?

Response.ContentType = "text/plain"

http://msdn.microsoft.com/library/en...9dfcfd053c.asp

It may help to do something with content-disposition, too:

Response.AddHeader("Content-Disposition","attachment;
filename=report.txt")

http://www.ietf.org/rfc/rfc2183.txt
http://support.microsoft.com/kb/q260519/

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.
Aug 15 '06 #3

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

Similar topics

17
by: George | last post by:
Newbie question: I'm trying to lauch Notepad from Python to open a textfile: import os b1="c:\test.txt" os.system('notepad.exe ' + b1) However, the t of test is escaped by the \, resulting...
4
by: Greg Miller | last post by:
Currently I am launching adobe reader using the following call: os.system("path.file.pdf") this works fine for opening the pdf doc at the beginning. We would like to enhance this and open the...
3
by: RN Das | last post by:
Hi expert, I have a small web application in C# and ASP.Net and I want to open a file in notepad when clicked on a linked button. Here is hander code when clicked on the link button. It can open...
2
by: andreas | last post by:
hi, In windows xp in the start launch menu when i put notepad "c:\test.txt" i get notepad with test.txt in it. in vb.net when i state system.diagnostics.process.start("notepad.exe" i get...
4
by: Ori :) | last post by:
Hi guys, I have a scenario where my application needs to run/start an application that is already installed on my machine. let's say - run an executable "ccc.exe". How do I call this...
24
by: Alan M Dunsmuir | last post by:
What is the command (in Windows Forms VB.NET) which will cause the subject computer's default browser to launch, and display a specified Web page? -- Alan M Dunsmuir
6
by: LordHog | last post by:
Hello all, I was wondering what is the best method of launching an application/exectable from within the Managed VC++ environment? I have found some information which describe CreateProcess and...
10
by: Andrew Neiderer | last post by:
I think I am asking the right newsgroup. If not maybe someone could tell me where to ask this "beginner" question. I want to click on an image (.jpg) that launches a Microsoft window (cmd.exe...
0
by: Mike Brophy | last post by:
I just developed my first VB.NET app and published it for CD-ROM deployment. It incorporates one third-party .dll. It completes install on client machines, but when it runs it errors with (on...
4
by: vol30w60 | last post by:
Hi folks, I am trying to launch a program with PHP code. I am running Apache on Windows XP SP2. I am using the method noted here: http://us2.php.net/manual/en/function.exec.php#59428 To...
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
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
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: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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

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.