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. How to asp:Literal with more..?

How to asp:Literal with more..?

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

    Hi,. I am using this to display text from database within asp:Literal:

    I want to know how can I limit the display to x number of characters with more link to display the full text just like the facebook comments?

    Technology News @ www.JassimRahma.com

    P N 3 Replies Last reply
    0
    • J Jassim Rahma

      Hi,. I am using this to display text from database within asp:Literal:

      I want to know how can I limit the display to x number of characters with more link to display the full text just like the facebook comments?

      Technology News @ www.JassimRahma.com

      P Offline
      P Offline
      Parwej Ahamad
      wrote on last edited by
      #2

      Through literal you can not do in css until you putting it into label or span or div. You can truncate your string in your code the you can display here. If you want to use in css then find very clear example to support most of the browser http://mattsnider.com/css-string-truncation-with-ellipsis/[^]

      Parwej Ahamad

      1 Reply Last reply
      0
      • J Jassim Rahma

        Hi,. I am using this to display text from database within asp:Literal:

        I want to know how can I limit the display to x number of characters with more link to display the full text just like the facebook comments?

        Technology News @ www.JassimRahma.com

        N Offline
        N Offline
        Nandakishore G N
        wrote on last edited by
        #3

        when you are binding the values from any source.create another alias in your selection query. ex: select fullname,left(fullname,20) as shortname from tablename the 20 mentioned can be of your need.and then bind the shortname to literal.it works.

        1 Reply Last reply
        0
        • J Jassim Rahma

          Hi,. I am using this to display text from database within asp:Literal:

          I want to know how can I limit the display to x number of characters with more link to display the full text just like the facebook comments?

          Technology News @ www.JassimRahma.com

          N Offline
          N Offline
          Nandakishore G N
          wrote on last edited by
          #4

          when you are binding the values from any source, create another alias in your selection query.

          ex: select fullname,left(fullname,20) as shortname from tablename

          the 20 mentioned can be of your need.and then bind the shortname to literal.it works.

          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