2

I'm running google earth in a web browser that is embedded in a c# app. I have captured an event through javascript that fires when the user right clicks on the globe. How can I bubble an event to go from the javascript to c# so that it can be handled there?

Thanks

1 Answer 1

1

To raise an event from Javascript, you need to follow these steps:

1) Create a hidden asp:button in your aspx page.
2) write the following JS code in aspx file:
     var btnHidden = document.getElementById(HiddenButtonClientId);
       if (btnHidden) { btnHidden.click(); }

Now, your button click event will be fired and you can write desirable code there.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.