Any opportunity to call a C # function using javascript?

I wrote an addin office and with which there is a function: openFile (String path) and in the addin office I insert a browser object, and with this I can embed the web page in the office admin, and now I hope that I can call the C # function "openFile" and pass the path on the webpage using javascript, open the assigned file for me. Is it possible? What can I do?

+3
source share
1 answer

Yes it is possible.

This is accomplished using the property window.external(and ObjectForScripting on the host side). See WebBrowser Management Overview in the FAQ section.

.

: , , , , BHO - /, .

+4

Source: https://habr.com/ru/post/1771224/


All Articles