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. wordwrap in asp:Literal

wordwrap in asp:Literal

Scheduled Pinned Locked Moved ASP.NET
htmldatabasesql-serversysadmintutorial
7 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.
  • J Offline
    J Offline
    Jassim Rahma
    wrote on last edited by
    #1

    I am retrieving a formatted html from my sql server text field into asp:Literal... I want ti know how to set the wordwrap for the asp:Literal?

    A B 2 Replies Last reply
    0
    • J Jassim Rahma

      I am retrieving a formatted html from my sql server text field into asp:Literal... I want ti know how to set the wordwrap for the asp:Literal?

      A Offline
      A Offline
      Anurag Gandhi
      wrote on last edited by
      #2

      Enclose your literal in a div tag and set the width of that div.

      Anurag Gandhi.
      http://www.gandhisoft.com
      Life is a computer program and every one is the programmer of his own life.
      My latest article: Group GridView Data

      N 1 Reply Last reply
      0
      • A Anurag Gandhi

        Enclose your literal in a div tag and set the width of that div.

        Anurag Gandhi.
        http://www.gandhisoft.com
        Life is a computer program and every one is the programmer of his own life.
        My latest article: Group GridView Data

        N Offline
        N Offline
        Not Active
        wrote on last edited by
        #3

        No, you don't need to wrap it in a div. The literal control will be rendered as a span which you should apply appropriate CSS styles to. From all of the responses you have given you have much to learn before giving solid advice to others.


        I know the language. I've read a book. - _Madmatt

        A 1 Reply Last reply
        0
        • N Not Active

          No, you don't need to wrap it in a div. The literal control will be rendered as a span which you should apply appropriate CSS styles to. From all of the responses you have given you have much to learn before giving solid advice to others.


          I know the language. I've read a book. - _Madmatt

          A Offline
          A Offline
          Anurag Gandhi
          wrote on last edited by
          #4

          Can you please try the following code at your system? <asp:Literal ID="myLiteral" runat="server" Text="Hello World"></asp:Literal>

          Mark Nischalke wrote:

          The literal control will be rendered as a span

          I looked at the html source generated from browser. There is no span at all. Please let me know if I am wrong. He is talking about Literal Control not the Label Control.

          Mark Nischalke wrote:

          From all of the responses you have given you have much to learn before giving solid advice to others.

          Well, no one is perfect. Nither me nor you. We all are learning. I am just trying my best to help others by sharing my opinion/experience.

          Anurag Gandhi.
          http://www.gandhisoft.com
          Life is a computer program and every one is the programmer of his own life.
          My latest article: Group GridView Data

          N 1 Reply Last reply
          0
          • A Anurag Gandhi

            Can you please try the following code at your system? <asp:Literal ID="myLiteral" runat="server" Text="Hello World"></asp:Literal>

            Mark Nischalke wrote:

            The literal control will be rendered as a span

            I looked at the html source generated from browser. There is no span at all. Please let me know if I am wrong. He is talking about Literal Control not the Label Control.

            Mark Nischalke wrote:

            From all of the responses you have given you have much to learn before giving solid advice to others.

            Well, no one is perfect. Nither me nor you. We all are learning. I am just trying my best to help others by sharing my opinion/experience.

            Anurag Gandhi.
            http://www.gandhisoft.com
            Life is a computer program and every one is the programmer of his own life.
            My latest article: Group GridView Data

            N Offline
            N Offline
            Not Active
            wrote on last edited by
            #5

            Yes, my mistake, I misread and thought Label


            I know the language. I've read a book. - _Madmatt

            A 1 Reply Last reply
            0
            • N Not Active

              Yes, my mistake, I misread and thought Label


              I know the language. I've read a book. - _Madmatt

              A Offline
              A Offline
              Anurag Gandhi
              wrote on last edited by
              #6

              no problem. :)

              Anurag Gandhi.
              http://www.gandhisoft.com
              Life is a computer program and every one is the programmer of his own life.
              My latest article: Group GridView Data

              1 Reply Last reply
              0
              • J Jassim Rahma

                I am retrieving a formatted html from my sql server text field into asp:Literal... I want ti know how to set the wordwrap for the asp:Literal?

                B Offline
                B Offline
                brunoseixas
                wrote on last edited by
                #7

                format the html text puting a div with word-wrap:break-all style attribute.

                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