Capturing javascript events in c #
I am running Google Earth in a web browser embedded in a C # application. I have captured the event via javascript that fires when the user right-clicks on the globe. How can I bubble an event to go from javascript to C # so that it can be handled there?
thank
+1
beyerss
source
to share
1 answer
To raise an event from Javascript you need to do the following:
1) Create a hidden asp: button in the aspx page.
2) write the following JS code in the aspx file: var btnHidden = document.getElementById (HiddenButtonClientId); if (btnHidden) {btnHidden.click (); }
Now your button click event will be fired and you can write your desired code there.
+1
Sachin Gaur
source
to share