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. ASP.NET
  4. Using EOL Character

Using EOL Character

Scheduled Pinned Locked Moved ASP.NET
csharpasp-nettutorialquestion
3 Posts 3 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.
  • P Offline
    P Offline
    Patricker
    wrote on last edited by
    #1

    Greetings, If this question has already been asked, and I just wasn't able to find it in the search please direct me to the appropriate post. I'm trying to figure out how to keep the returns, or EOL characters, that are entered into a text box. Just like how i hit enter in between 'Greetings' and my message. Right now if i just make a standard text box in my asp.net page, and i make it multiline and i enter 3 lines of text when i output it to a label it will just show up as a single line all scrunched together. What I'm assuming is that I have to do a find replace for the end of line character, which i have no idea how to do. --Peter

    J 1 Reply Last reply
    0
    • P Patricker

      Greetings, If this question has already been asked, and I just wasn't able to find it in the search please direct me to the appropriate post. I'm trying to figure out how to keep the returns, or EOL characters, that are entered into a text box. Just like how i hit enter in between 'Greetings' and my message. Right now if i just make a standard text box in my asp.net page, and i make it multiline and i enter 3 lines of text when i output it to a label it will just show up as a single line all scrunched together. What I'm assuming is that I have to do a find replace for the end of line character, which i have no idea how to do. --Peter

      J Offline
      J Offline
      jcrussell
      wrote on last edited by
      #2

      I think you have to use Server.URLEncode(textbox1.text) and then Server.URLDecode(textbox1.tex) /jason

      P 1 Reply Last reply
      0
      • J jcrussell

        I think you have to use Server.URLEncode(textbox1.text) and then Server.URLDecode(textbox1.tex) /jason

        P Offline
        P Offline
        PerthCoder
        wrote on last edited by
        #3

        You will probably have to convert the EOL char into "
        " just before you pass the text through Server.URLEncode() So, you would probably want to search for '%0D' OR '%0A' and replace them with "
        " HTH! Chris

        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