Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replaced line breaks with <BR> 1

Status
Not open for further replies.

tomomark

Technical User
May 23, 2003
109
GB
Hi Everyone,

What i have is a record in a database, which when pulled looses all of its line break, and comes out as one long line . . . in the record, it maintains its line break etc.

Does anyone know how i replace line breaks with <BR> so when out pulled from database looks right . . .

. . . is it best to insert the <BR> before it goes into the database or when pulling it out?

Replace(varComments, chr(10), "<br />")

Mark
 
Before
Code:
Replace(VarComments,VBCRLF,"<br />")
after
Code:
Replace(VarComments,"<br />",VBCRLF)

Good luck



Note:Copying and Pasting is NoT Creativity.
What would you attempt to accomplish if you knew you would not fail?
 
Hi . . .

Im sorry to bother you again, but it doesnt seem to be working . . . im sure its something im doing tho! Searched around alot, doesnt seem to be very well documented

Code:
<% 
Dim VarComments
VarComments = page_contents.FieldValue("page_code", Container)
Replace(VarComments,VBCRLF,"<br />")
Replace(varComments, chr(10), "<br />") 
response.write(VarComments)
%>
 
ignore me, i sorted it out :S lol

Code:
<% 
Dim VarComments
VarComments = page_contents.FieldValue("page_code", Container)
Response.Write(Replace(varComments, VbCrLf, "<br>"))
%>
[/code
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top