472,119 Members | 1,527 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,119 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 7575
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

17 posts views Thread by George | last post: by
24 posts views Thread by Alan M Dunsmuir | last post: by
10 posts views Thread by Andrew Neiderer | last post: by
4 posts views Thread by vol30w60 | last post: by
reply views Thread by leo001 | last post: by

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.