Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Linefeed in normal text

Linefeed in normal text

Scheduled Pinned Locked Moved Web Development
questionhtmldatabasehelp
7 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Brendan Vogt
    wrote on last edited by
    #1

    Hi there, I have text coming from a database table field which I want to use for the body of my email massage. But the email must be in plain text format, and not HTML format. How do I get the text to display like as if it is like HTML format. What I means, the following text: Mr Brendan Vogt wrote:Australian Chris du Toit, is one of the most affable athletes in the sport of triathlon.Chris took the World No. 1 position and destroyed arguably the greatest field ever assembled in triathlon, to win both the 1997 Triathlon World Championships and the 1997 ITU World Cup Series. ...should look like: Mr Brendan Vogt wrote: Australian Chris du Toit, is one of the most affable athletes in the sport of triathlon. Chris took the World No. 1 position and destroyed arguably the greatest field ever assembled in triathlon, to win both the 1997 Triathlon World Championships and the 1997 ITU World Cup Series. I hope you understand?? Any help or advice will be greatly appreciated! Cheers. Brendan

    T J L D 4 Replies Last reply
    0
    • B Brendan Vogt

      Hi there, I have text coming from a database table field which I want to use for the body of my email massage. But the email must be in plain text format, and not HTML format. How do I get the text to display like as if it is like HTML format. What I means, the following text: Mr Brendan Vogt wrote:Australian Chris du Toit, is one of the most affable athletes in the sport of triathlon.Chris took the World No. 1 position and destroyed arguably the greatest field ever assembled in triathlon, to win both the 1997 Triathlon World Championships and the 1997 ITU World Cup Series. ...should look like: Mr Brendan Vogt wrote: Australian Chris du Toit, is one of the most affable athletes in the sport of triathlon. Chris took the World No. 1 position and destroyed arguably the greatest field ever assembled in triathlon, to win both the 1997 Triathlon World Championships and the 1997 ITU World Cup Series. I hope you understand?? Any help or advice will be greatly appreciated! Cheers. Brendan

      T Offline
      T Offline
      Ted Ferenc
      wrote on last edited by
      #2

      I assume there is a LF or CR/LF after say Vogt wrote: why not simply change them to <BR> when you display in your HTML page?


      "An education isn't how much you have committed to memory, or even how much you know. It's being able to differentiate between what you do know and what you don't." - Anatole France

      1 Reply Last reply
      0
      • B Brendan Vogt

        Hi there, I have text coming from a database table field which I want to use for the body of my email massage. But the email must be in plain text format, and not HTML format. How do I get the text to display like as if it is like HTML format. What I means, the following text: Mr Brendan Vogt wrote:Australian Chris du Toit, is one of the most affable athletes in the sport of triathlon.Chris took the World No. 1 position and destroyed arguably the greatest field ever assembled in triathlon, to win both the 1997 Triathlon World Championships and the 1997 ITU World Cup Series. ...should look like: Mr Brendan Vogt wrote: Australian Chris du Toit, is one of the most affable athletes in the sport of triathlon. Chris took the World No. 1 position and destroyed arguably the greatest field ever assembled in triathlon, to win both the 1997 Triathlon World Championships and the 1997 ITU World Cup Series. I hope you understand?? Any help or advice will be greatly appreciated! Cheers. Brendan

        J Offline
        J Offline
        JKroschel
        wrote on last edited by
        #3

        If you can replace the line feeds with a
        tag, that is definatly the best way to go. If not, use the preformated text tag.

        It may look a little funny (different font, etc), but at least the return characters will be shown.

        1 Reply Last reply
        0
        • B Brendan Vogt

          Hi there, I have text coming from a database table field which I want to use for the body of my email massage. But the email must be in plain text format, and not HTML format. How do I get the text to display like as if it is like HTML format. What I means, the following text: Mr Brendan Vogt wrote:Australian Chris du Toit, is one of the most affable athletes in the sport of triathlon.Chris took the World No. 1 position and destroyed arguably the greatest field ever assembled in triathlon, to win both the 1997 Triathlon World Championships and the 1997 ITU World Cup Series. ...should look like: Mr Brendan Vogt wrote: Australian Chris du Toit, is one of the most affable athletes in the sport of triathlon. Chris took the World No. 1 position and destroyed arguably the greatest field ever assembled in triathlon, to win both the 1997 Triathlon World Championships and the 1997 ITU World Cup Series. I hope you understand?? Any help or advice will be greatly appreciated! Cheers. Brendan

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          I may be completely wrong, but from your message and the one you posted later, I assume that: 1. you are working in classic asp. 2. you are receiving some data from the database. 3. you are creating an e-mail message from the above data. 4. the requirement is that the above e-mail is in plain-text. If all of the above are correct, use character 10 and 13 to add line field/carriage return. (or vbCrLf). If not, I am sorry! As a side note, if you are creating e-mail messages to be processed by SMTP server, make sure that mime type is set to text. Good Luck!:)

          B 1 Reply Last reply
          0
          • L Lost User

            I may be completely wrong, but from your message and the one you posted later, I assume that: 1. you are working in classic asp. 2. you are receiving some data from the database. 3. you are creating an e-mail message from the above data. 4. the requirement is that the above e-mail is in plain-text. If all of the above are correct, use character 10 and 13 to add line field/carriage return. (or vbCrLf). If not, I am sorry! As a side note, if you are creating e-mail messages to be processed by SMTP server, make sure that mime type is set to text. Good Luck!:)

            B Offline
            B Offline
            Brendan Vogt
            wrote on last edited by
            #5

            Hi, You are 99% correct! It's no data from the database. It's a string that I have hard coded myself. This is mainly for the people that can view emails only as text. The email component gives me an option of either having the body as HTML, or as plain text. I have chosen plain text, but I am not sure if the
            tags will work in plain text, don't think so. And I have tried the character 10 and 13, not working either. I will try again the weekend. Thanks for coming back!!

            L 1 Reply Last reply
            0
            • B Brendan Vogt

              Hi, You are 99% correct! It's no data from the database. It's a string that I have hard coded myself. This is mainly for the people that can view emails only as text. The email component gives me an option of either having the body as HTML, or as plain text. I have chosen plain text, but I am not sure if the
              tags will work in plain text, don't think so. And I have tried the character 10 and 13, not working either. I will try again the weekend. Thanks for coming back!!

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              Try this: strBody = "Mr Brendan Vogt wrote:" & vbCrLf & "Australian Chris du Toit, is one of the most affable athletes in the sport of triathlon." & vbCrLf & vbCrLf & "Chris took the World No. 1 position and destroyed arguably the greatest field ever assembled in triathlon, to win both the 1997 Triathlon World Championships and the 1997 ITU World Cup Series."

              1 Reply Last reply
              0
              • B Brendan Vogt

                Hi there, I have text coming from a database table field which I want to use for the body of my email massage. But the email must be in plain text format, and not HTML format. How do I get the text to display like as if it is like HTML format. What I means, the following text: Mr Brendan Vogt wrote:Australian Chris du Toit, is one of the most affable athletes in the sport of triathlon.Chris took the World No. 1 position and destroyed arguably the greatest field ever assembled in triathlon, to win both the 1997 Triathlon World Championships and the 1997 ITU World Cup Series. ...should look like: Mr Brendan Vogt wrote: Australian Chris du Toit, is one of the most affable athletes in the sport of triathlon. Chris took the World No. 1 position and destroyed arguably the greatest field ever assembled in triathlon, to win both the 1997 Triathlon World Championships and the 1997 ITU World Cup Series. I hope you understand?? Any help or advice will be greatly appreciated! Cheers. Brendan

                D Offline
                D Offline
                d_vaibhav
                wrote on last edited by
                #7

                Hi Brendan, If you are using .net you can replace all your crlf's with Environment.NewLine or you can use \r\n as well regards vaibhav dhandarphale

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups