473,386 Members | 1,647 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,386 software developers and data experts.

How to open a text file in notepad?

I have created a notepad in c#.
Now i want to open a text file in my notepad. but i dont know how to do that, can anybody help me?
Oct 1 '10 #1
2 1954
hype261
207 100+
Here is a link to do a knowledge base on how to do basic IO in C#.

http://support.microsoft.com/kb/304430
Oct 1 '10 #2
GaryTexmo
1,501 Expert 1GB
To open a file in notepad, you'll actually need to launch the notepad process with a command line option pointing to your file.

Expand|Select|Wrap|Line Numbers
  1. Process p = new Process();
  2. ProcessStartInfo startInfo = new ProcessStartInfo("notepad.exe", theFileName);
  3. p.StartInfo = startInfo;
  4. p.Start();
Oct 1 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Jesper | last post by:
How can I open a textfile from C# using notepad (or the user assigned application for this).
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...
7
by: Lumpierbritches | last post by:
Thank you in advance for any and all assistance. Is there a way to open a specific text file in Visual Basic.NET? If so, what is the code? Michael
3
by: sohan | last post by:
hi I have hyperlink column in a datagrid. The column contains the name of a text file. I am able to appendthe full path of the file. The file is on D drive on the server. But on clicking on...
0
by: SimplySuzy | last post by:
Help I am trying to open a text file that I am naming dynamically through global variables in a dts package. When I print the file name to the screen, it is correct. When I use the dts package...
4
by: Stupid48 | last post by:
I'm trying to do a simple task but can't seem to find a solution. How do I read lines from a text file backwards. i.e. I want to select the last 20 lines of a text file and display them in...
1
by: buggtb | last post by:
Hi Guys, I've been given the joyous task of updating some very old scripts at work and I could do with a little help. Our Unix system dumps text files to pseudo spoolers that our windows...
2
by: veer | last post by:
Hi i want to open a text file from vb.net coding but i am not getting any idea actually i used the following code conect = ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:\as.txt;Extended...
1
by: sydmil | last post by:
Hello, I am relatively new to VB6 and I was wondering if anyone could show me an example of a VB6 code to do the following: Open text file (which is a column of numbers) in excel - comma...
0
by: Autostrad | last post by:
Can anybody tell me how to open (print)a text file to the screen. For example, to click a botton and the file will be shown in the screen. Using something like the code below. private:...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.