473,543 Members | 2,320 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 7739
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.publi c.scripting.jsc ript*, 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.Conten tType = "text/plain"

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

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

Response.AddHea der("Content-Disposition","a ttachment;
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
21020
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 in Notepad trying to open "c: est.txt".
4
4402
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 document to either a page or a nameddest in the doc. The syntax for that in the DOS command prompt world is: acroRd32.exe /A "nameddest=Before You...
3
4842
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 a process of notepad on the server , but does not open the file in notepad. What am I doing wrong? can you show me how to do it please? What I am...
2
15453
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 notepad but
4
1346
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 executable from within my application and run it? Thanks!
24
2064
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
1292
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 ShellExecute(Ex), but I was wondering if there is a perferred way of performing this task in Managed VC++ that use Windows Forms? I am trying to...
10
3620
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 or command.com) which executes some .exe, e.g googleearth.exe. I know this is simple for most of you but I am just starting XHTML. I think it begins...
0
838
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 Vista): "WindowsApplication1 cannot run" Error code: CLR20r3 Type: System.InvalidOperationException
4
22844
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 simplify things, I am trying to launch notepad with the following line of code:
0
7397
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7582
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7726
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7329
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5877
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
4884
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3384
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1809
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
626
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.