0

hi frds,
i have create a .txt file and write some data.
i want to open on screen that .txt file for reading by a click a button.
if you have the answer, so please help me.
thanks in advance
....

4
Contributors
6
Replies
10
Views
8 Years
Discussion Span
Last Post by Amit Dhemar
0

You can create your viewer to text files by using control like RichTextBox and use .LoadFile method which takes text file path
Or
Using default text file editor on client machine by call Process.Start(filePath);

0

thank you sir, for giving idea. I use richtext box method but when i load the .txt file it hold all data but not show.
will you help me again by providing code.
thanks a lot

0

No, no code. You havent demonstrated what you've tried, why should someone else do it for you?

You show us your code, you tell us where your debugging says it goes wrong, and we'll help you try and work out why

0

System.Diagnostics.Process.Start(@"c:\textfile.txt");
or any other file by just passing the file path along with its extension but not work if the required package is not installed that is needed to open it.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.