So I'm developing a .NET desktop application for ArcGIS in VB. As a new part of the application I have developed an SVG / Javascript map as a 'loading screen' where you select your dataset to load into ArcMap. This map is currently held in a html doc and displayed in an html viewer in a windows form. My question is this:

Is it possible for javascript events/functions in my web map to fire .NET code in my application? Can I pass variables from javascript to .NET? Etc...

I imagine this will be quite tricky if possible, as you won't want any old javascript on a website to start messing with your running .NET applications. I'm willing to hack this all together if there's a way.


EDIT: To be clear, this is not an ASP.NET (server side) web application, this is a purely vb.net desktop application. So I think AJAX / Postback solutions won't work in this case.


So you're putting a WebBrowser control in a Winforms application? I believe what you want to do can be used with the WebBrowser.ObjectForCallback property (useful examples are on that page) and a set of callbacks for your implementation.

  • Hi Jason. Yes I'm using the webbrowser control. That looks perfect, I should be able to do exactly what I need to do using that property. Many thanks. +1 – pvdev May 28 '14 at 16:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.