-1

I am using a webBrowser in C# that hosts a html file. But I have to create a file (uri)in order for the webBrowser to run the html. Is there anyway to "save" the html in memory, so the webBrowser can call the html in the program memory. I have some javascript that goes to anchors elements so the filepath changes ie nameoffile.html#a1 to nameoffile.html#a2. Is there anyway to to upload the html to a webBrowser in memory and have the javascirpt run correctly?

NinjaMan
  • 45
  • 8

1 Answers1

0

Something like this should do the trick :

dynamic doc = webBrowser.Document;
var htmlText = doc.documentElement.InnerHtml;
Quentin Roger
  • 6,410
  • 2
  • 23
  • 36