TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
K S Reddi Prasad
NA
28
75.3k
Problem with RichTextBox's .rtf property
Apr 18 2011 7:28 AM
Hi all,
I am having a problem with the Richtextbox's .rtf property.
In my form, I am having a dropdownlist and a Richtextbox. I am getting the items of Dropdownlist dynamically and these values are in fact the elements of an xml file. whenever i select any item, corresponding value of that item(element in xml) is to be displayed in RichText box.
for that i had coded like this:
XDocument xmlDocument = XDocument.Parse(xmlPath);
var DropDowns = from DropDown in xmlDocument.Descendants("Item")
select new
{
Item = DropDown.Element("Text").Value,
Value = DropDown.Element("Value").Value
};
foreach (var DropDown in DropDowns)
{
if (selectedText == DropDown.Item)
{
rtbReuseData.Rtf= xElement.Element(DropDown.Value).Value;
}
Now, I am getting a message such that "
Invalid File Format
". Here I can also take .text instead of .Rtf, but i want exact format of Text.
PLease help me in solving this.....
Thanks & Regards,
K.S.R. Prasad.
Reply
Answers (
1
)
Gridview inside gridview Problem.
C#.net project install