+ Post New Thread
Results 1 to 4 of 4
Web Development Thread, Carriage return to </ br> in Coding and Web Development; I'm just tinkering about with something in ASP and was wondering if there was a simple way to do this: ...
  1. #1

    Hightower's Avatar
    Join Date
    Jun 2008
    Location
    Cloud 9
    Posts
    4,920
    Thank Post
    494
    Thanked 690 Times in 444 Posts
    Rep Power
    239

    Carriage return to </ br>

    I'm just tinkering about with something in ASP and was wondering if there was a simple way to do this:

    A user types into a text box a couple of paragraphs (which are separated by some carriage returns). The user then submits it to a database but the carriage returns are gone.

    I need a way to tell it for each carriage return put a <br /> in place.

    I'm sure there is a simple solution and someone will sort me out
    Last edited by Hightower; 21st October 2008 at 01:25 PM. Reason: Got the tag wrong... Doh!

  2. IDG Tech News
  3. #2

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,333
    Blog Entries
    2
    Thank Post
    604
    Thanked 900 Times in 630 Posts
    Rep Power
    296
    Code:
    replace(text,VbCrLf,"<br>")

  4. #3

    Hightower's Avatar
    Join Date
    Jun 2008
    Location
    Cloud 9
    Posts
    4,920
    Thank Post
    494
    Thanked 690 Times in 444 Posts
    Rep Power
    239
    Cheers Craig - as soon as you posted it it jogged my memory.... Been a while.

  5. #4

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,856
    Thank Post
    412
    Thanked 776 Times in 649 Posts
    Rep Power
    170
    Presumably you're going to present it back in HTML at some point; you could also store it literally and use <pre></pre> around it.

SHARE:
+ Post New Thread

Similar Threads

  1. Acorn to return to market???
    By Norphy in forum Hardware
    Replies: 5
    Last Post: 4th January 2010, 02:45 PM
  2. [CLOSED] Bug/Error: Return To Edugeek After Donation
    By FN-GM in forum EduGeek.net Site Problems
    Replies: 6
    Last Post: 13th March 2009, 05:32 PM
  3. Replies: 3
    Last Post: 16th September 2008, 10:32 PM
  4. Return to top of page
    By elsiegee40 in forum Comments and Suggestions
    Replies: 8
    Last Post: 10th June 2008, 09:55 PM
  5. LG monitors return
    By ChrisH in forum Hardware
    Replies: 7
    Last Post: 25th August 2006, 06:12 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •