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. Enter key to <br>

Enter key to <br>

Scheduled Pinned Locked Moved ASP.NET
csharpquestion
4 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.
  • Z Offline
    Z Offline
    Zeke Le
    wrote on last edited by
    #1

    How can I convert an Enter key to <br> using C#. I can do that in VB.NET by using Replace(ControlChars.CrLf, <br> ) But in C# I don't know. Can anyone show me, please?  No time to breathe

    L 1 Reply Last reply
    0
    • Z Zeke Le

      How can I convert an Enter key to <br> using C#. I can do that in VB.NET by using Replace(ControlChars.CrLf, <br> ) But in C# I don't know. Can anyone show me, please?  No time to breathe

      L Offline
      L Offline
      leppie
      wrote on last edited by
      #2

      yourstring.Replace("\n","<br>"); :) "I dont have a life, I have a program." Also, I won't support any software without the LeppieRules variable.

      Z 1 Reply Last reply
      0
      • L leppie

        yourstring.Replace("\n","<br>"); :) "I dont have a life, I have a program." Also, I won't support any software without the LeppieRules variable.

        Z Offline
        Z Offline
        Zeke Le
        wrote on last edited by
        #3

        Thank you I got another question :rolleyes: : Is there a way that I can compare a specific date to a current date so that I know how many day have passed?  No time to breathe

        M 1 Reply Last reply
        0
        • Z Zeke Le

          Thank you I got another question :rolleyes: : Is there a way that I can compare a specific date to a current date so that I know how many day have passed?  No time to breathe

          M Offline
          M Offline
          Martin Haesemeyer
          wrote on last edited by
          #4

          Look at the TimeSpan and DateTime data types (especially DateTime.Substract which returns a TimeSpan) Cheers HTH Martin "Situation normal - all fu***d up" Illuminatus!

          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