I want to copy only first 5o characters from the richtextboxA to either a textbox or richtextboxB.... in a visual webpart ..the richtextboxA can have images,tables formating,html, blank spaces.. if it is html text shud be converted to normal text..blank spaces shud be truncated,table images shud be skipped ...from the previous post i have been using String.Join("\n", respRichTextBox.Text.Split('\n').Take(2).ToArray()) this takes the first two line from a richtextbox...but due to change in requirement this code wud need some modification..any suggestions?
Tell me more
×
SharePoint Stack Exchange is a question and answer site for
SharePoint enthusiasts. It's 100% free, no registration required.
|
|
|||
|
|
|
You can use this great class: SPHttpUtility.ConvertSimpleHtmlToText() |
|||
|
|
|
I'm not entirely certain what you are doing here but why not do something simple like:
|
|||
|
|
|
SPHttpUtility.ConvertSimpleHtmlToText().SubString(0,50) |
|||
|