Click here to Skip to main content
15,063,596 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
If I have a label which consist some text with some 100 words and initially i want to show only 20 words and when I click on the more link it need to expand and show the complete text. Do we have any such feature?

Kindly give with example!

Thanks In Advance!!
Posted

We can do like first assign the 20charater string to the label after that on clicking the next link assign the string with 100character.
   
Comments
Mannava Siva Aditya 8-Jan-13 13:24pm
   
Can you keep up with a small example! of code
IpsitaMishra 9-Jan-13 0:33am
   
Yes sure :)
If I have a label which consist some text with some 100 words and initially i want to show only 20 words and when I click on the more link it need to expand and show the complete text. Do we have any such feature?
Generally, this feature is done using a collapsible div/span. When you find certain text more than a defined length, you show few characters only in the label. Post label, place another label or image on click of which div would appear that has rest of the text. Basically, you play with the display style of the div. Generally, this concept is used to show/hide details. You can find examples on web as collapsible panel using Javascript.

Try out and post specific issue if you face.
   
Comments
Mannava Siva Aditya 8-Jan-13 13:25pm
   
can you be little more presize with a small example! with code. Thanks!
Sandeep Mewara 9-Jan-13 0:11am
   
Which part was not clear and you need further help? Tried anything?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900