Click here to Skip to main content
13,046,087 members (56,349 online)
Rate this:
Please Sign up or sign in to vote.
I have html files data which are with .htm extension...i want to open that file in rich text box in can i do code is below...but it gives error that
'HTML Format' data format not supported.<br />
Parameter name: dataFormat

   richTextBox_LessonView.Document = new FlowDocument();
                TextRange documentTextRange = new TextRange(
                    richTextBox_LessonView.Document.ContentStart, richTextBox_LessonView.Document.ContentEnd);
                using (FileStream fs = File.Open("softskill.htm", FileMode.Open))
                    documentTextRange.Load(fs, System.Windows.DataFormats.Rtf);
Posted 17-Jun-11 23:24pm
Updated 17-Jun-11 23:40pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

vishal_h 18-Jun-11 6:01am
thanks but i am using VS2008 and that application is in vs2010 so some method are not working...
Monjurul Habib 18-Jun-11 6:07am
google and you will find those for vs2008. :)
vishal_h 18-Jun-11 6:11am
Sir i refer this and working with this..
but i have two GB data which is in .htm extension and not opening in that rich text box..
could you please help me..i try at my best but as i am fresher i am not getting...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 18 Jun 2011
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100