ASP - Launching Notepad.exe Client-side

Discussion in 'ASP General' started by SpamUsHereInstead@comcast.net, Aug 14, 2006.

  1. Guest

    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, 2006
    #1
    1. Advertising

  2. 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.
     
    Bob Barrows [MVP], Aug 14, 2006
    #2
    1. Advertising

  3. 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-us/iissdk/html/7dfd936a-b985-4e15-a774-269dfcfd053c.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.
     
    Dave Anderson, Aug 15, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Peter Rilling

    Re: Launching client side applications

    Peter Rilling, Apr 14, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    391
    Peter Rilling
    Apr 14, 2005
  2. =?Utf-8?B?U3RhdGljYm9i?=

    Launching Excel client side

    =?Utf-8?B?U3RhdGljYm9i?=, Aug 19, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    4,380
  3. kisshug

    how to call notepad.exe from a c program

    kisshug, Dec 17, 2005, in forum: C Programming
    Replies:
    7
    Views:
    456
    Flash Gordon
    Dec 17, 2005
  4. Replies:
    2
    Views:
    453
  5. Replies:
    3
    Views:
    190
Loading...

Share This Page