Dear all,

I have added WebBrowser control in my program to display some message. I
assign text that I want to display to WebBrowser control by using
DocumentText property. Everything fine when I first assign the value but
there is nothing change when I try to assign another value to display again.
I've called Refresh() method but nothing display after the method is involve.
What should I do if I want the WebBrowser to display dynamic html text that
is generated from my program to display in WebBrowser control not only in
first assign value?

Thanks,
Teeravee Sirinapasawasdee

Re: WebBrowser.DocumentText problem by Charles

Charles
Fri Dec 09 04:20:08 CST 2005

Hi Teeravee

Try the following:

WebBrowser1.Document.OpenNew(True)
WebBrowser1.DocumentText = "Your text"

However, I should add that if I only execute the second line, on subsequent
attempts to change the document text I get a dialog window appear asking me
if I want to save the changes to the document. I would have expected you to
see the same thing.

HTH

Charles


"Teeravee Sirinapasawasdee"
<TeeraveeSirinapasawasdee@discussions.microsoft.com> wrote in message
news:19E137F2-2390-427F-A3DF-B849DF6BDDAC@microsoft.com...
> Dear all,
>
> I have added WebBrowser control in my program to display some message. I
> assign text that I want to display to WebBrowser control by using
> DocumentText property. Everything fine when I first assign the value but
> there is nothing change when I try to assign another value to display
> again.
> I've called Refresh() method but nothing display after the method is
> involve.
> What should I do if I want the WebBrowser to display dynamic html text
> that
> is generated from my program to display in WebBrowser control not only in
> first assign value?
>
> Thanks,
> Teeravee Sirinapasawasdee