PDA

View Full Version : textarea and paragraph


ebco
01-08-2004, 08:11 AM
If i am typing some text in textbox with using paragraph i.e. enter key and if I want to show it on the next page or send it as email message what should i do to show as it is like my problem is pragraph seperation is not coming its coming in one line.

one thing I know is I can put <br> tag where i want paragraph what else?

jeskel
01-08-2004, 08:23 AM
you can use the <pre></pre> tag around the text to display.

<edit>
Whammy also gave that code one day to someone having a similar question:

Function VbCrLfToBreak(ByVal str)
If IsNull(str) Then Exit Function
VbCrLfToBreak = Replace(str,vbCrLf,"<br />")
End Function


</edit>

Bullschmidt
02-05-2004, 09:45 AM
Or similarly but without the function:

' Convert all vbCrLf to <br>.
' (This is the same as converting Chr(13) & Chr(10) to <br>.)
varFld = Replace(varFld, vbCrLf, "<br>")