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. Gettin a piece of specified text from any field.

Gettin a piece of specified text from any field.

Scheduled Pinned Locked Moved ASP.NET
databasehelptutorialquestion
3 Posts 2 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.
  • T Offline
    T Offline
    Tarik Guney
    wrote on last edited by
    #1

    Hey, I have a database and it contains article table so this table contains two field named Header and Content. Then i wanna show this data in a gridview control but there are two pages. the first one contains just label which is used to show any article's header and another label which is used to show some piece of article's content text. But how can i show some piece of article's content text to the user. For example i wanna get 5000 letters from begining of an article's content which is preserved in database.It is said there is an query to handle this.But i couldnt find that query. Please help me. Thanks and regards..

    S 1 Reply Last reply
    0
    • T Tarik Guney

      Hey, I have a database and it contains article table so this table contains two field named Header and Content. Then i wanna show this data in a gridview control but there are two pages. the first one contains just label which is used to show any article's header and another label which is used to show some piece of article's content text. But how can i show some piece of article's content text to the user. For example i wanna get 5000 letters from begining of an article's content which is preserved in database.It is said there is an query to handle this.But i couldnt find that query. Please help me. Thanks and regards..

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

      Use the SUBSTRING function (or SUBSTR for Oracle) like SELECT header, SUBSTRING(content, 0, 5000)

      T 1 Reply Last reply
      0
      • S szukuro

        Use the SUBSTRING function (or SUBSTR for Oracle) like SELECT header, SUBSTRING(content, 0, 5000)

        T Offline
        T Offline
        Tarik Guney
        wrote on last edited by
        #3

        Thanks man :)

        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