Click here to Skip to main content
15,898,134 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using freetext box asp.net c# for inserting the data into database, when i bind that data in div tag the whole data comes and bind. But i want to show only limited text . for this i used description.ToString().SubString(200), It show first 200 characters from the description but the problem is it also shows the html tags with the data. so is there any other solution which works just like substring method for freetext/Richtextbox control?

What I have tried:

FreeTextBoxDescription.ToString().SubString(200);
Posted
Updated 4-Nov-17 18:03pm

1 solution

try
FreeTextBoxDescription.HtmlStrippedText.SubString(200);

refer HtmlStrippedText Property[^]
 
Share this answer
 
Comments
Umair Nafis 5-Nov-17 3:02am    
It does not recognise HtmlStrippedText , putting dot after FreeTextBoxDescription. it shows Aggregate<>, All<> , Any<>, AsEnumerable<> and so on.....
Karthik_Mahalingam 5-Nov-17 3:25am    
you are using this rite ?
http://www.freetextbox.com/
Umair Nafis 5-Nov-17 11:10am    
yes.
Karthik_Mahalingam 5-Nov-17 11:17am    
What is the id of freetextbox control
Umair Nafis 6-Nov-17 8:48am    
FreeTextBoxDescription

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