WebBrowser component

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
 
H

Herfried K. Wagner

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
 
N

NotYetaNurd

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>";

}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top