Hello,
We are using following code to get the property owner for an order.
order.Title.Commitment[0].CurrentOwner;
The problem with above is that, if user enter owner information with any styles applied (like BOLD, ITALICS etc.) then what we get is a big long string whcih contains that font/style information as well.
What we want to fetch is plain text that user has entered without any style information, how can we get that?
Thanks
How to fetch PropertyOwner in plain text
Re: How to fetch PropertyOwner in plain text
Some of the field data in Select is stored as RTF in order to retain formatting information. To convert it to plain text, one option is to leverage the RichTextBox .NET type directly, such as:
Code: Select all
string plain = null;
using ( System.Windows.Forms.RichTextBox box = new System.Windows.Forms.RichTextBox( ) )
{
box.Rtf = yourRtfString;
plain = box.Text;
}