Control to render HTML

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

H

I have spent some time searching without success

Using VS.Net 2003

Is there a control which will simply render HTML? It seems obvious that there should be but I can't find it - and I don't need the power or internet access functionality of the axbrowser..

Or, if I do have to use axbrowser, how do I supply my own HTML to it

Regards & TI
Tro
 
Using VS.Net 2003
Is there a control which will simply render HTML? It seems obvious that there should be but I can't find it -
and I don't need the power or internet access functionality of the axbrowser...

Except for axbrowser, I'm not aware of any, no.
Or, if I do have to use axbrowser, how do I supply my own HTML to it?

You can certainly do that - however, we've been struggling with some
weird behaviours in axbrowser at times - I sure wish that promised,
fully managed web browser control will be released BEFORE Whidbey (mid
2005) !! :-)

Marc

================================================================
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)inova.ch
 
Thanks Mar

How do I send the HTML to axbrowser without writing it to a file and then pointing axbrowser at the file
You can certainly do that - however, we've been struggling with som
weird behaviours in axbrowser at times - I sure wish that promised
fully managed web browser control will be released BEFORE Whidbey (mi
2005) !! :-)

Regard
Tro
 
How do I send the HTML to axbrowser without writing it to a file and then pointing axbrowser at the file?

We use this code snippet to accomplish that task:

public void LoadURL(string aURL)
{
Object o = null;
axWebBrowser1.Navigate(aURL, ref o, ref o, ref o, ref o);
}

public void LoadDocument(string aHTMLString)
{
// First time load situation needs an about:blank
if (axWebBrowser1.Document == null)
{
LoadURL("about:blank");
}

IHTMLDocument2 oDoc = (IHTMLDocument2)axWebBrowser1.Document;

//clear document -- HACK
if (oDoc.body != null)
{
oDoc.body.innerText = "";
}

//write to document
object[] oDocSource = { aHTMLString };

oDoc.write(oDocSource);
}

HTH
Marc

================================================================
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)inova.ch
 
Back
Top