Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
i need to read the .txt file and i have to display that value in text box.


hai dudes............
help me.........
how can its possible.............
Posted

1. read the text file into a string.
2. set the string into the TextBox.Text[^] property.

Which part of this are you having difficulty with?
 
Share this answer
 
If the entire text from the file is to be displayed in the TextBox, then following method can be used
C#
TextBox1.Text = System.IO.File.ReadAllText(fileName);
 
Share this answer
 
 
Share this answer
 
v2
Here is the link for you
Google[^]

Do simple search in CP/google before posting Question
--RA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900