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. Database & SysAdmin
  3. Database
  4. text in multiline.

text in multiline.

Scheduled Pinned Locked Moved Database
csharpasp-netdatabasesysadminquestion
4 Posts 4 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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    Hi, One of my stored procedure returns a string, which is the combination of fields like 'Ship Name : Ship1 Port Name : Port1 City : London' and I want show this data in my Asp.Net page i.e in TextArea control as follows (i.e in multiline). Ship Name : Ship1 Port Name : Port1 City : London. I am adding the '\n' charector after each value like. 'Ship Name : Ship1 :XYZ \n Port Name : Port1 \n City : London'. And in C# i am using Server.HtmlDecode, but it is not working how can I display the data in multiline. Regards, Kalyan

    S C S 3 Replies Last reply
    0
    • L Lost User

      Hi, One of my stored procedure returns a string, which is the combination of fields like 'Ship Name : Ship1 Port Name : Port1 City : London' and I want show this data in my Asp.Net page i.e in TextArea control as follows (i.e in multiline). Ship Name : Ship1 Port Name : Port1 City : London. I am adding the '\n' charector after each value like. 'Ship Name : Ship1 :XYZ \n Port Name : Port1 \n City : London'. And in C# i am using Server.HtmlDecode, but it is not working how can I display the data in multiline. Regards, Kalyan

      S Offline
      S Offline
      SeMartens
      wrote on last edited by
      #2

      Hi Kaylan instead using the '\n' character use Environment.NewLine. This should help. Regards Sebastian

      1 Reply Last reply
      0
      • L Lost User

        Hi, One of my stored procedure returns a string, which is the combination of fields like 'Ship Name : Ship1 Port Name : Port1 City : London' and I want show this data in my Asp.Net page i.e in TextArea control as follows (i.e in multiline). Ship Name : Ship1 Port Name : Port1 City : London. I am adding the '\n' charector after each value like. 'Ship Name : Ship1 :XYZ \n Port Name : Port1 \n City : London'. And in C# i am using Server.HtmlDecode, but it is not working how can I display the data in multiline. Regards, Kalyan

        C Offline
        C Offline
        Colin Angus Mackay
        wrote on last edited by
        #3

        Since you are using this in an ASP.NET application you can use the appropriate HTML tags (<br> or <p>). Using Environment.Newline in this case will be ignored by the Browser's HTML renderer.


        My: Blog | Photos WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More

        1 Reply Last reply
        0
        • L Lost User

          Hi, One of my stored procedure returns a string, which is the combination of fields like 'Ship Name : Ship1 Port Name : Port1 City : London' and I want show this data in my Asp.Net page i.e in TextArea control as follows (i.e in multiline). Ship Name : Ship1 Port Name : Port1 City : London. I am adding the '\n' charector after each value like. 'Ship Name : Ship1 :XYZ \n Port Name : Port1 \n City : London'. And in C# i am using Server.HtmlDecode, but it is not working how can I display the data in multiline. Regards, Kalyan

          S Offline
          S Offline
          softty
          wrote on last edited by
          #4

          Try '\r\n' in place of '\n', May it solve your problem love2code

          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