WebBrowser.DocumentText problem

G

Guest

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
 
C

Charles Law

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"
 

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