Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET
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 8-Jan-13 2:14am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

We can do like first assign the 20charater string to the label after that on clicking the next link assign the string with 100character.
  Permalink  
Comments
Mannava Siva Aditya at 8-Jan-13 13:24pm
   
Can you keep up with a small example! of code
IpsitaMishra at 9-Jan-13 0:33am
   
Yes sure :)
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
Comments
Mannava Siva Aditya at 8-Jan-13 13:25pm
   
can you be little more presize with a small example! with code. Thanks!
Sandeep Mewara at 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)

  Print Answers RSS
0 Maciej Los 250
1 OriginalGriff 210
2 Manfred R. Bihy 190
3 CHill60 180
4 _Amy 155
0 OriginalGriff 7,445
1 Sergey Alexandrovich Kryukov 6,177
2 Maciej Los 3,774
3 Peter Leow 3,478
4 CHill60 2,702


Advertise | Privacy | Mobile
Web03 | 2.8.140721.1 | Last Updated 8 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100