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


Yes the textbox is multiline

Just small question, you read text from file and then write it to textbox?? or what?

I read from a html file into a textbox

Look, I tried it myself it works fine without replacing anything, Just I read text file using this

string str = File.ReadAllText(filePath);
textbox.Text = str;

No additional characters added!!
May be you should provide non-unicoding in ReadAllText method.

That works!

Thank you