This project has moved. For the latest updates, please go here.

How to display HTML file content?

Topics: Developer Forum
Apr 12, 2011 at 10:11 PM


I have used HTML Agility Pack to read a complete HTML file like the following coding:

 protected void Page_Load(object sender, EventArgs e)
            String l_pfad = this .Server .MapPath ("Besucher_Text.htm");
            HtmlAgilityPack.HtmlDocument l_file = new HtmlAgilityPack.HtmlDocument();
            l_file.Load( l_pfad);

            Besucher_publicDynamic.InnerHtml = l_file.DocumentNode.InnerHtml;
In my HTML page, there is a DIV tag with ID "Besucher_publicDynamic" in order to display the loaded HTML content from file.
This works perfectly for HTML formatted text. If I insert an image into the HTML file "Besucher_Text.htm", the embedded image file will not be displayed.
I created the HTML document with Word 2010 and have saved to htm.
What can be done to get the image displayed as well?