tags:

views:

85

answers:

0

Hi,

I'm building a .NET 3.5 app that uses a System.Windows.Forms.WebBrowser component to render a timeline, courtesy of the awesome JavaScript timeline code at http://simile-widgets.org. In my C# code, I create a string containing the HTML and JSON to render, and assign it to the DocumentText property of the WebBrowser control.

The HTML is valid -- I can copy and paste it out of the debugger and load it properly in Safari and Chrome on Mac and IE7 on Vista (my dev machine). However, when the control loads, it pops up an alert box whose title is "Message from webpage" with the text "Out of memory at line: 2385". Upon dismissing the alert box, the timeline generally renders, but none of the event points that I provided to the JS library in the HTML are rendered. (Again, the same exact HTML copied out of the debugger and pasted into an HTML document does render just fine.)

Also, it renders fine if I set the WebBrowser's Url property to point to the file containing the text I copied out of the debugger.

Any ideas why this might happen?

Thanks!