Open a .txt file in Notepad

G

Guest

Hi all,

In our application, we need to allow users to look at the content of one
specific log file (txt extension) that is created by the application in
notepad.
Although, it seems like an easy task, but I cannot accomplish this.
Any suggestion would be really apprecieated.
Thanks in advance.

Roy
 
S

Steve Barnett

Try
Process.Start("<filename to open.txt>");

You'll need a using for System.Diagnostics. It opens the application
associated with txt files and loads the named file.

HTH
Steve
 
G

Guest

Steve, thanks for your response.

Steve Barnett said:
Try
Process.Start("<filename to open.txt>");

You'll need a using for System.Diagnostics. It opens the application
associated with txt files and loads the named file.

HTH
Steve
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top