File format is invalid for .rtf format

Apr 7 2011 3:31 AM

Hi all,

        Currently i am working on VSTO with C#.net. I am having a form where i am have one DropDownList and a RichTextBox.
When I select an item in the list, the xmldata(tags)from the database has to be shown in RichTextBox.

       Here is the code snippet:

                                       rtbReuseData.Rtf= xElement.Element(DropDown.Value).Value;
       
        Now, when i am selecting an item from the DropDownList, it is showing an error "File format is Not valid". (When i take the .text instead of .rtf, it is showing some data but is not of <xml > format.)I want to show xml format data in the Richtextbox.

        Please help me in getting this problem solved.
 
        Thanks,
        K.S.Reddi Prasad.

                         

Answers (4)