how to read the data from NOTEPAD

Posted by Rojasamala under VB.NET on 7/26/2013 | Points: 10 | Views : 19836 | Status : [Member] | Replies : 4
how to read the data from NOTEPAD or .txt file.How to split the .txt file and save in different .txt files in windows forms

Thanks
S Roja
http://aspdotnet-roja.blogspot.com



Responses

Posted by: Satyapriyanayak on: 7/26/2013 [Member] [MVP] Silver | Points: 25

Up
0
Down
Thanks

http://aspdotnet-roja.blogspot.in/2012/06/how-to-read-data-from-notepad-or-txt.html

If this post helps you mark it as answer
Thanks

Rojasamala, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: aswinialuri-19361 on: 7/26/2013 [Member] Starter | Points: 25

Up
0
Down
Hi,
refer this link it might be useful to you
http://stackoverflow.com/questions/10529758/how-to-read-text-data-in-particular-font-using-c


Mark as Answer if it helps you
Thanks&Regards
Aswini Aluri

Rojasamala, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ssj_Kumar on: 7/28/2013 [Member] Starter | Points: 25

Up
0
Down
Below two link will be helpful on reading a data from Text file
http://www.daniweb.com/software-development/vbnet/threads/200243/getting-data-from-notepad
http://support.microsoft.com/kb/816149

Regards,
Jayakumar Selvakani

Rojasamala, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Raj.Trivedi on: 7/28/2013 [Member] [MVP] Starter | Points: 25

Up
0
Down
Hello This is the way to do it

First drag and drop a button and name it as browse and then drag and drop a file dialog box and write this code for reading it

private void button5_Click(object sender, EventArgs e)
{
openFileDialog1.ShowDialog();
}

private void openFileDialog1_FileOk(object sender, CancelEventArgs e)
{
xtxtContent.Text = File.ReadAllText(openFileDialog1.FileName.ToString());

}

For saving it

Drag a Button name it as save and on its click event use this

File.WriteAllText("C:\\demo.txt", textBox1.Text);

Regard's
Raj.Trivedi
"Sharing is Caring"
Please mark as answer if your Query is resolved

Rojasamala, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response