Thursday, March 4, 2010

Scrolling Webbrowser Control in C# and VB.net

I was searching long for to scroll webbrowser control to bottom or at specific point in Windows application. There where many solutions given but none was working. Specially if doctype is mentioned WebBrowserControl.Document.Body.ScrollTop = will not work. So I found a work around and it works 100%.

Solution:
WebBrowserControl.navigate("javascript:window.scroll(0,3050);");

You can change 3050 to the position you want. I used 3050 to scroll it to bottom.

Hope this help many people searching for solution.

Cheers

~ Upendra Kolte

www.ingenioustech.co.in


7 comments:

  1. Great thinking. Really helped me.

    Thanks !
    Abi

    ReplyDelete
  2. Thank you, finally a working solution!

    ReplyDelete
  3. This works, 100% !!!

    ReplyDelete
  4. Sweet! The code just works, period.

    ReplyDelete
  5. thank you sooooooooo muuuuuuuuuch i was really searching for it for a long time ^^ thanks again

    Peace & love

    ReplyDelete

Please post your comments on this articles so that I can provide with you information you are looking for and also let me know if you like or dont like this article. Your comments are most welcome.