"<html>" "<head>" "<script>" function Go(){ DivGoTo.scrollIntoView(true); } "</script>" "</head>" "<body>" "<div id ="DivInner"> </div>" "<div id ="DivGoTo"> </div> " "</body>" "</html>"In the DivInner section you can place with DOM your innerHTML and afterwards you can fire the script that goes to DivGoTo section thatcomes after DivInner section .To do this I placed a webbrowser and a button on the form.
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"); } } }>>Maybe if you have the script function in the html header you can fire it with DOM,like :WebBrowser.Document.Script.MyFunction, after you are filling the document with new data/innerHTML.