>"<html>" >"<head>" >"<script>" > function Go(){ > DivGoTo.scrollIntoView(true); > } > > >"</script>" > >"</head>" >"<body>" > >"<div id ="DivInner"> </div>" >"<div id ="DivGoTo"> </div> " > >"</body>" > >"</html>" >>
>namespace WindowsApplication1 >{ > partial class Form1 : Form > { > > > string cBigFile = "<pre>"; > > private void button1_Click(object sender, EventArgs e) > { > webBrowser1.Url = @"c:\weggooi\blank.html"; > > for (int i = 1; i <= 1000; i++) > { > cBigFile = cBigFile + "\n" ; > } > cBigFile = cBigFile + "</prae>";//prae = actually pre > > > } > >>
> >\\ to write innerhtml and fire the script to go the end section after the: >\\ document is completed > private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) > { > > webBrowser1.Document.GetElementById("DivInner").InnerHtml = cBigFile; > webBrowser1.Document.InvokeScript("Go"); > } > > } >} >InvokeScript() is not a method of the WebBrowser.Document object.