0

I have a site ran in jQuery, and I am loading it in a browser object in C#. The site loads fine and functions as expected. The only issue I am experiencing is that when new data appears on the screen, no scroll bar displays in the browser object, and the content goes past the bottom of the browser object, out of view.

I'm looking for a solution to this. Here is what I was thinking:

  1. Is there a C# browser object event that is passed when data is sent/received via Ajax? If so, can I tell the object to scroll to the bottom of the page?

  2. Is there a way w/ JS that I can add on my webpage that makes the page auto-scroll? Though I don't think this would work because the C# browser object never technically reaches the bottom of the page. It will continue to go as long as you enter data.

  3. Any other options anyone can think of?

Furqan Safdar
  • 16,260
  • 13
  • 59
  • 93
Sugitime
  • 1,818
  • 4
  • 23
  • 44

3 Answers3

0

Is the ScrollBarsEnabled property set?

MyWebBrowserControl.ScrollBarsEnabled = True
Rob Hardy
  • 1,821
  • 15
  • 15
  • Yes this is set. The issue is that the original content (on load complete) does not require a scroll bar, so it does not appear. – Sugitime Oct 10 '12 at 16:55
  • Then I'd recommend you add a QueryString which you can use from your web content to enable the scrollbars via CSS/Javascript and add the querystring to the address in your browser control. This means you still keep your original look when not in the browser control. – Rob Hardy Oct 10 '12 at 17:00
0

Through the browser control you are able to insert / edit the styles on the page which you are displaying - see here.

Using this technique, you should be able to remove or otherwise override the style which is hiding the scrollbars.

Community
  • 1
  • 1
Rob Hardy
  • 1,821
  • 15
  • 15
0

Had to use JQuery to scroll the screen automatically. Didnt necessarily figure out why it wasnt working in the first place, but using jquery to scroll was a good work around.

Sugitime
  • 1,818
  • 4
  • 23
  • 44