views:

145

answers:

0

Hi,

I'm hosting my WinForms control in Internet Explorer. Additionally I've implemented IExpando interface to be able to emulate unexisted fields and methods in my C# code when javascript code try to access them. For example

var myobj = new ActiveXObject('server.object');
myobj.Foo = "FooText";
myobj.Bar("BarText");

Note that my C# class doesn't contain Foo field and Bar method. IExpando.AddField will be called with parameter name="Foo", but IExpando.AddMethod will not be executed. In case of myobj.Bar("BarText"); only IReflect.GetMethods, IReflect.GetProperties and IReflect.GetFields methods will be executed.

Does anyone knows why IExpando.AddMethod was not called?

Thanks, Paul.