WebBrowser component

  • Thread starter Thread starter RC
  • Start date Start date
R

RC

Hi there,

Is-it possible to load a page in a WebBrowser component
without using the Navigate mathod but instead to send a
string directly to the component. To clarify my idea, I
generate an HTML page in code. To view it in the
WebBrowser I have to save the HTML page to disk and then
to navigate to it. I would like to skip this saving to
disk step and just pass the string directly to the
webbrowser component. Can it be done?

Thanks,
RC
 
Hello,

RC said:
Is-it possible to load a page in a WebBrowser component
without using the Navigate mathod but instead to send a
string directly to the component. To clarify my idea, I
generate an HTML page in code. To view it in the
WebBrowser I have to save the HTML page to disk and then
to navigate to it. I would like to skip this saving to
disk step and just pass the string directly to the
webbrowser component. Can it be done?

http://makeashorterlink.com/?N1A831D25

Regards,
Herfried K. Wagner
 
just give this a try

private void Form1_Load(object sender, System.EventArgs e)
{
object obj=null;
Browser.Navigate("about",ref obj,ref obj,ref obj,ref obj);
}

private void test(object sender,
AxSHDocVw.DWebBrowserEvents2_NavigateComplete2Event e) //navigateComplete2
eventhdler
{
IHTMLDocument2 htmlDocument = (IHTMLDocument2)Browser.Document;
IHTMLElement body = (IHTMLElement)htmlDocument.body;

body.innerHTML = "<html><body>hello world</body></html>";

}
 
Back
Top