Development Forum blank line addition (line break)

Discussion in 'Software' started by puzzler_uk, 19 Jul 2004.

  1. puzzler_uk

    puzzler_uk What's a Dremel?

    Joined:
    7 Sep 2003
    Posts:
    317
    Likes Received:
    0
    Ok i wrote my entire forum for my site. benshole.tk but something i failed to think about was how to get the ASP to write a <br> from an actual line space in the text area. For example on this professional decent message board, when i press return

    i actually get the line spaces. But on mine, it doesnt. Because it saves it as one big line into the access database for the forum. Does anyone know how to get it to see a line and replace with <br> I have a find and replace script already for inserting smilies. So if its a case of looking for a particular ascii code then it wont be too hard. Thanks alot.

    Ben

    Bens Hole
     
  2. mookie

    mookie very nawty<br><img src="http://mookie.org/i/avatar

    Joined:
    30 Jun 2002
    Posts:
    639
    Likes Received:
    1
    Did a little searching ("nl2br() in asp") and found this:

    Code:
    replace(TheString, vbCrLf, "<br>")
     
  3. puzzler_uk

    puzzler_uk What's a Dremel?

    Joined:
    7 Sep 2003
    Posts:
    317
    Likes Received:
    0
    Thanks man, that was exactly 100% what i needed. Great stuff.
     

Share This Page