Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Post
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
11
Reply
How can i read txt file and set value in textbox through c#
Feroz Khan
8 years ago
530
Reply
Please see below code and picture i want to read data from .txt every after pipe value i want to fix value in text box how can i do this.. with search text box.
using (StreamReader sr = new StreamReader(@"C:\filename.txt", true))
{
while ((line = sr.ReadLine()) != null)
{
if(line.Contains(barcode_or_item_txt.Text))
{
Price_txt.Text = line.Substring(8,5);
}
}
}
Attachment:
Notepad_File.rar
Post
Reset
Cancel
Answers (
11
)
Next Recommended Forum
Pl Correct it one class,one interface in interface concept
about verbatim string