Load HTML in WebBr from string

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

Guest

Hi,

Is there an alternative to an URI location when loading html into a
webBrowser control.

I have some html generated in a string. I would like to skip saving the
string to a file on disk and then loading it from disk into webbrowser with
its Navigate() method. Is there a direct (string -> browser) method instead?.

Thanks.
Jesper, DK.
 
No, that didn't help.

Im building data output in html format like this

string src = "<html>.......</html>"

webBrowser.Load(src).

.... but no such functionality seems to exist. I have to save the string
first to disk and then load it into the browser using navigate... And I dont
want disk operations involved.

Any tips on how to avoid disk operations?

regards Jesper
 
Hi,

You can use webbrowser.documentText property to assign the html content
to webbrowser document. Also you can use streaming to load html.

Best Regards
 
Hi,

You can use webbrowser.documentText property to assign the html content
to webbrowser document. Also you can use streaming to load html.

Best Regards,
Erman OLCA
 

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

Back
Top