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. pick and show starting text in asp.net from database

pick and show starting text in asp.net from database

Scheduled Pinned Locked Moved ASP.NET
tutorialcsharpasp-netdatabasequestion
3 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.
  • D Offline
    D Offline
    dream_liner_7e7
    wrote on last edited by
    #1

    i have a paragraph/article in database for example abcdefghij aaaaaaa bbbbbbbbbb ccccccc dddddddd eeeeeee fffffff i just want to show some beginning text from that paragraph/article in my asp.net page when user click details then it show the whole paragraph or article HOW TO PICK STARTING TEXT FROM DATABASE ONLY abcdefghij NOT THE WHOLE ARTICLE?

    E R 2 Replies Last reply
    0
    • D dream_liner_7e7

      i have a paragraph/article in database for example abcdefghij aaaaaaa bbbbbbbbbb ccccccc dddddddd eeeeeee fffffff i just want to show some beginning text from that paragraph/article in my asp.net page when user click details then it show the whole paragraph or article HOW TO PICK STARTING TEXT FROM DATABASE ONLY abcdefghij NOT THE WHOLE ARTICLE?

      E Offline
      E Offline
      eyeseetee
      wrote on last edited by
      #2

      First dont type in capitals it means you are shouting. To cut of the text surely just set the character limit on the field when you take it from the database

      1 Reply Last reply
      0
      • D dream_liner_7e7

        i have a paragraph/article in database for example abcdefghij aaaaaaa bbbbbbbbbb ccccccc dddddddd eeeeeee fffffff i just want to show some beginning text from that paragraph/article in my asp.net page when user click details then it show the whole paragraph or article HOW TO PICK STARTING TEXT FROM DATABASE ONLY abcdefghij NOT THE WHOLE ARTICLE?

        R Offline
        R Offline
        Rutvik Dave
        wrote on last edited by
        #3

        you can use substring in your sql statement / C# code. i.e. SQL : select substring(para,1,10) from mytable where paraID = 1234 C# : short_para = para.Substring(0,10); also just check the lenght > 10 of the string before this so that you will not get the error like. index is out of the string...or something... and please (dont take this in wrong way) first try the google or msdn, if you dont get the answers then post in the forum. because there are soo many post in the different forums, for the indian developer posting basic questions (questions that can be found using google ot msdn). (I just read one in the Lounge) may be this is the reason nobody is replying you, or i may also get a reply that dont answer such basic questions. there is one article on code project for how use google search. please refer to that. thanks...

        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