WebBrowser.DocumentText won't load activex controls



I have a VB.NET 2005 application and am trying to use the DocumentText
method on a WebBrowser control to load a web page from a string I've
created. The string includes the line:

var xmlSrc = new ActiveXObject("Microsoft.xmldom");

in the header. The program works if I write the string to a file and then
load the page using something like

WebBrowser1.Url = New Uri("c:\file.html")

but if I try to use it like this:

WebBrowser1.DocumentText = myString

I get the error

"Automation server can't create object."

on the line where I'm create the activex object. I'm guessing it has
something to do with security settings since I get an error when I try
loading the file but when I click "allow blocked content" the file displays
correctly.

Can anyone tell me the correct way to do this?

Thanks.
Al


.



Relevant Pages

  • Re: Problem when I boot...
    ... You have an invalid or remnant entry in a place used to load programs on ... What's likely is that a program neglected to enclose its load string ... enclose the string identifying the program within double quotes if it ... the spaces embedded in the paths to their executables. ...
    (microsoft.public.windowsxp.hardware)
  • Re: Counting occurrences of a string in loadlib
    ... I would also suggest to load and compare. ... modules in the load libraries should be "logically" equivalent, ... the occurrences of a given string in each load module and come up with a total for each load library. ... Has anyone written a program to LOAD two modules and compare them? ...
    (bit.listserv.ibm-main)
  • Re: Reflection Question and MDI question
    ... Ok that given why are you compiling them as executables.. ... Private strUserID As String ... Private strUserType As String ... I want to load these programs in an MDI form. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Importing a changing text file
    ... Function GetText(sFile As String) As String ... Dim nSourceFile As Integer, sText As String ... This function will load the data from txt file to the textframe. ...
    (microsoft.public.powerpoint)
  • Re: Importing a changing text file
    ... Function GetText(sFile As String) As String ... Dim nSourceFile As Integer, sText As String ... This function will load the data from txt file to the textframe. ...
    (microsoft.public.powerpoint)