•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C# section within the Software Development category of DaniWeb, a massive community of 391,769 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,187 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C# advertiser:
Views: 722 | Replies: 6 | Solved
![]() |
Hello,
I have a textbox which I write data out to. I use "\n" to make sure that the next line of data is written on a new line. This works but I keep getting an unwanted character at the end of each line of data written. It looks like a small square - I think its because I'm using "\n". Does anyone know how to get rid of this character or a better way to write the data to new lines.
Thanks in advance
SubProf
I have a textbox which I write data out to. I use "\n" to make sure that the next line of data is written on a new line. This works but I keep getting an unwanted character at the end of each line of data written. It looks like a small square - I think its because I'm using "\n". Does anyone know how to get rid of this character or a better way to write the data to new lines.
Thanks in advance
SubProf
Your TextBox is multiline or isn't??
B.Sc Computer Science, Helwan University
Microsoft Student Partner
Personal blog http://ramymahrous.blogspot.com/
Arabic technical blog http://fci-h-ar.blogspot.com/
English technical blog http://fci-h.blogspot.com/
Microsoft Student Partner
Personal blog http://ramymahrous.blogspot.com/
Arabic technical blog http://fci-h-ar.blogspot.com/
English technical blog http://fci-h.blogspot.com/
Just small question, you read text from file and then write it to textbox?? or what?
Last edited by RamyMahrous : Jun 6th, 2008 at 11:44 am.
B.Sc Computer Science, Helwan University
Microsoft Student Partner
Personal blog http://ramymahrous.blogspot.com/
Arabic technical blog http://fci-h-ar.blogspot.com/
English technical blog http://fci-h.blogspot.com/
Microsoft Student Partner
Personal blog http://ramymahrous.blogspot.com/
Arabic technical blog http://fci-h-ar.blogspot.com/
English technical blog http://fci-h.blogspot.com/
Look, I tried it myself it works fine without replacing anything, Just I read text file using this
No additional characters added!!
May be you should provide non-unicoding in ReadAllText method.
C# Syntax (Toggle Plain Text)
string str = File.ReadAllText(filePath); textbox.Text = str;
May be you should provide non-unicoding in ReadAllText method.
Last edited by RamyMahrous : Jun 6th, 2008 at 12:07 pm.
B.Sc Computer Science, Helwan University
Microsoft Student Partner
Personal blog http://ramymahrous.blogspot.com/
Arabic technical blog http://fci-h-ar.blogspot.com/
English technical blog http://fci-h.blogspot.com/
Microsoft Student Partner
Personal blog http://ramymahrous.blogspot.com/
Arabic technical blog http://fci-h-ar.blogspot.com/
English technical blog http://fci-h.blogspot.com/
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb C# Marketplace
Other Threads in the C# Forum
- Previous Thread: C# To java convertor
- Next Thread: Return path


Linear Mode