Textbox Carriage Return

  • Thread starter Thread starter dancer
  • Start date Start date
D

dancer

Using ASP.Net and VB.net

I have textboxes (<asp:textbox id......>) in which the user will be entering
paragraphs.
They are multiline (several rows and several columns).
The carriage returns that the user puts in (return/enter key) do not show up
when the data is retrieved. It is one long line.
Is there any way to make the user's paragraph divisions show up in the
report?
 
Keep in mind, the text they are typing is plain ASCII text. It includes
line-breaks but they're ASCII text linebreaks. That means when you retrieve
them and display them in a web page it's meaningless because they aren't
HTML line breaks. You just need to do a Replace() on the text string and
replace the carriage return linefeed with a <br /> element. I believe in
VB.Net this is a vbCrLf for both a carriage return and linefeed. Pass this
to the replace as Replace(vbCrLf,"<br />")
 
YEA!!! It works!
Thank you.


Mark Fitzpatrick said:
Keep in mind, the text they are typing is plain ASCII text. It includes
line-breaks but they're ASCII text linebreaks. That means when you
retrieve them and display them in a web page it's meaningless because they
aren't HTML line breaks. You just need to do a Replace() on the text
string and replace the carriage return linefeed with a <br /> element. I
believe in VB.Net this is a vbCrLf for both a carriage return and
linefeed. Pass this to the replace as Replace(vbCrLf,"<br />")
 
Back
Top