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