Save HTML in GeckoFx VB.NET -
i trying save whole html code of active page within geckofx webbrowser in vb.net.
does know how this? possible @ all?
here i've tried:
gwb_browser.navigate(surl) gwb_browser.savedocument()
i got empty html-document.
then tried:
gwb_browser.navigate("view-source:" + surl)
now html-code of site displayed in browser. tried select finish document , save it.
gwb_browser.selectall() gwb_browser.savedocument()
but result same empty html file before.
so far think of.
is there way did not try?
edit: @tom: when trying suggestion content of string looks this: "< html >< head >< /head >< body >< /body >< /html >" _
while using standard webbrowser control, code save html code looks this:
dim hreq httpwebrequest dim hres httpwebresponse dim ssessionpage string dim ostream stream dim ostreamreader streamreader hreq = directcast(httpwebrequest.create(surl), httpwebrequest) hres = directcast(hreq.getresponse(), httpwebresponse) ostream = hres.getresponsestream() ostreamreader = new streamreader(ostream) ssessionpage = ostreamreader.readtoend()
i can't find equivalent in geckofx browser.
vb.net geckofx
No comments:
Post a Comment