Click here to Skip to main content
12,399,799 members (45,503 online)
Rate this:
 
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 8-Jan-13 13:24pm
   
Can you keep up with a small example! of code
IpsitaMishra 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 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)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.160721.1 | Last Updated 8 Jan 2013
Copyright © CodeProject, 1999-2016
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