I have a VB.net class registered for COM interop which I'm instantiating within an HTML page using the following code:
I can call methods on it just fine, but suppose I want to set a javascript function as a property, like so:
MyClass.TestFunction = function () { alert("It worked!"); }
How would I set my vb.net code up to be able to fire that function? This is how MSXML works in javascript for XMLHttpRequest objects, you can set
XHR.onreadystatechange = function () {}
I'm looking for a similar implementation in my class.
以上就是Invoke a javascript function with VB.net through COM Interop的详细内容,更多请关注web前端其它相关文章!