Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi everybody,

I need an HTML renderer which can render a string containing HTML tags; but a System.Windows.Form.WebBrowser doesn't do that correctly! For example take a look at this code:

C#
WebBrowser wBrowser1 = new WebBrowser ();
wBroser.1.Navigated += new WebBrowserNavigatedEventHandler(wBroser1_Navigated); 

WebBrowser wBrowser2 = new WebBrowser ();

wBrowser1.Navigate("www.codeproject.com");

private void wBrowser1_Navigated(object sender, WebBrowserNavigatedEventArgs e)
{ 
     wBrowser2.DocumentText = wBrowser1.DocumentText;
}


When I do something like that I expect to see something like what I see in my internet browser, but you can try it and see the difference.
And of course I can't navigate a url directly from wBrowser2 , because I'm manipulating the html tags before rendering them in second WebBrowser control.

I just need an HTML renderer and I tought using System.Windows.Form.WebBrowser is the simplest way to do that, but it's not working, so I'm not insisting on using this control. I just need to render a web page with its HTML tags, as any web browser does!

Thanks.
Posted

Here is a free HTML renderer control.http://htmlrenderer.codeplex.com/[^]
 
Share this answer
 
Comments
Amir Hossein Farhangi 5-Aug-11 20:55pm    
It's much worse than WebBrowser and it can't do what I want! But thanks ;)
Wonde Tadesse 5-Aug-11 21:18pm    
But why? It looks to me what you are looking for. It render and shows the HTML tags.
Sergey Alexandrovich Kryukov 5-Aug-11 22:02pm    
It's better then WebBrowser in several respects. First of all, there is more control over presentation and its modification, easier to use.
--SA
Amir Hossein Farhangi 6-Aug-11 6:35am    
I agree that it's easier to use, and it's very good for simple html tags, but when you try to render a more complex web page (like codeproject home page) the result is not good! Did you tried that your selft?

Its good when you are writing html tags from the beginning by your self.
Sergey Alexandrovich Kryukov 5-Aug-11 22:01pm    
Probably this is the renderer of the same author, not sure is this is the same component/version or not.
Please see. I tried it and really liked. My 5 for your answer.
--SA
The renderer I tried and liked very much is this one: A Professional HTML Renderer You Will Use[^]. May be this is really "A Professional HTML Renderer You Will Use"?

—SA
 
Share this answer
 
Comments
Wonde Tadesse 5-Aug-11 22:08pm    
5+. Ya it's the same author.
Sergey Alexandrovich Kryukov 5-Aug-11 23:10pm    
Thank you, Wonde.
--SA

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900