Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

replace function in asp

Explorer ,
Sep 11, 2006 Sep 11, 2006
Hi,
I have a text box whcih saves to a database. When I call the text in the database it displays without showing any of the carriage returns. I know I need to use the replace function, however I'm sure sure where ? Is it before saving to the database ? because I can't see any characters indicating a carriage return in the text saved to the database ? so I'm not sure what to replace ?

OR should I replace before saving ?

I'm sure this a simple one-liner, but can't find it.

Any advice or code snippet appreciated.
TOPICS
Server side applications
269
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , Sep 11, 2006 Sep 11, 2006
Doh, found my own answer.

<% sometext=recordset.Fields.Item("databasefield").Value
response.write(Replace(sometext, vbCrLf, "<br>"))
%>
Translate
Explorer ,
Sep 11, 2006 Sep 11, 2006
LATEST
Doh, found my own answer.

<% sometext=recordset.Fields.Item("databasefield").Value
response.write(Replace(sometext, vbCrLf, "<br>"))
%>
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines