Squares in TexBoxes where CrLf should be

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
 
J

Jeff Gaines

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.
 
G

Guest

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.
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top