Squares in TexBoxes where CrLf should be

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a TextBox in VB.Net that is multiline and has AcceptReturn set to
True. When I put in a few lines, save it to the database (via a web service)
and return it back, the carriage return/line feeds show up as black squares.

If I view the text coming back from the web service in the Immediate window,
it looks corrects (the black squares do not show up).

Any ideas?

======================================
David McCarter [Microsoft VB.NET MVP]
www.vsdntips.com
 
I have a TextBox in VB.Net that is multiline and has AcceptReturn set to
True. When I put in a few lines, save it to the database (via a web
service)
and return it back, the carriage return/line feeds show up as black
squares.

If I view the text coming back from the web service in the Immediate
window,
it looks corrects (the black squares do not show up).

Any ideas?

Is it being converted to Linux format during its journeys?
DOS uses 0x0D0x0A as a line ending, Linux only uses one of them (can't
remember which).
I have just moved some stuff from RTF to Text format and had to replace
the \n character with Environment.Newline.
 
No linux! LOL Just a VS.NET 2005 smart client application talking to a
ASP.NET web service and using SQL Server 2005 as the database.
 
Hi,

Try looking for the ASCII value for that character (square block); and then
use string.replace to remove/replace it with proper data.

It could be a CR or LF.

Thanks,
Rajneesh
 
Back
Top