VS.NET 2005, IE, UserControls

  • Thread starter Thread starter bruce
  • Start date Start date
B

bruce

I have exhaustively researched this topic for several days now and
haven't made any headway. Microsoft documentation seems to be
EXCEEDINLY poor regarding this topic, and that is regarding using
JScript to interact with a control/assembly embedded into an Internet
Explorer page.

I have created a class library project which contains a single class
that descends from ListBox. When I embed the object like

<object id="List1" name="List1" width="500" height="200"
classid="http:controls.dll#MyListBox" VIEWASTEXT></object>

it certainly loads. I see the ListBox. I have even played with
controls like a Label from which I expose a property that allows me to
be able to change the label text and I seem to be able to adjust this
property through the <param> tag. I just can't seem to interact with
it through JScript. Every time I try to access a method, it gives me a
"Object doesn't support this property or method" either way I try it.

document.getElementByID("List1").AddItem("XXXXXX");
List1.AddItem("YYYYYY");


I have fooled around with permissions till I am blue in the face. I
don't think that is the problem. The control loads. It seems to me
that IE doesn't seem to be able to use reflection or whatever mechanism
it uses to figure what propertys and methods are available.

Any help? I can't believe it is this difficult. .NET was supposed to
make my life EASIER!
 
It's always amazing. The minute you ask for help ...

I recompiled the source code from the article, converting from 2003 to
2005. The DLL went from 4K to 16K, but it still works in the HTML
page. So, it doesn't appear to be anything with VS.NET 2005.

I then started looking for differences between his class and a class
that I just created that descended from Label, which didn't work ....
and I found it. Right click on the project properties. Click on the
application section. Click on the assembly information button. Make
sure the "Make assembly COM-Visible" is checked.

It works. I will have to investigate this, since from what I read,
..NET assemblies didn't follow the old ActiveX type configuration.
 
Back
Top