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. Word wrapping for asp.net label control

Word wrapping for asp.net label control

Scheduled Pinned Locked Moved ASP.NET
questioncsharpasp-netdatabasehelp
5 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.
  • S Offline
    S Offline
    Suryanairg
    wrote on last edited by
    #1

    Hi, How can I enable Wordwrapping feature for alabel control. My Label control is populated from the d database. It returs a very lenghty text. So it breaks the page layout. can any one help me??

    Surya Nair

    A 1 Reply Last reply
    0
    • S Suryanairg

      Hi, How can I enable Wordwrapping feature for alabel control. My Label control is populated from the d database. It returs a very lenghty text. So it breaks the page layout. can any one help me??

      Surya Nair

      A Offline
      A Offline
      AprNgp
      wrote on last edited by
      #2

      put your label control inside a panel control. Set the Wrap property of Panel as TRUE

      Apurv A man is but the product of his thoughts. What he thinks, he becomes. .......Mahatma Gandhi Be the change you want to see in the world. .......Mahatma Gandhi

      S K 2 Replies Last reply
      0
      • A AprNgp

        put your label control inside a panel control. Set the Wrap property of Panel as TRUE

        Apurv A man is but the product of his thoughts. What he thinks, he becomes. .......Mahatma Gandhi Be the change you want to see in the world. .......Mahatma Gandhi

        S Offline
        S Offline
        Suryanairg
        wrote on last edited by
        #3

        It is not working...same problem happens My Code : Surya Nair

        A 1 Reply Last reply
        0
        • S Suryanairg

          It is not working...same problem happens My Code : Surya Nair

          A Offline
          A Offline
          AprNgp
          wrote on last edited by
          #4

          try setting the style as ...

          style="text-align:justify;"

          apply this style to a htmltable

          Apurv A man is but the product of his thoughts. What he thinks, he becomes. .......Mahatma Gandhi Be the change you want to see in the world. .......Mahatma Gandhi

          1 Reply Last reply
          0
          • A AprNgp

            put your label control inside a panel control. Set the Wrap property of Panel as TRUE

            Apurv A man is but the product of his thoughts. What he thinks, he becomes. .......Mahatma Gandhi Be the change you want to see in the world. .......Mahatma Gandhi

            K Offline
            K Offline
            KermWare
            wrote on last edited by
            #5

            I used the following in my VB code of my asp.net web app: Label1.Text = Replace(MessageText, vbNewLine, <br>) MessageText is, of course, my label text which may or may not contain newlines.

            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