Creating event listeners to dojo objects that are dynamically created

655
2
09-04-2013 01:10 PM
AndyMonplaisir
New Contributor II
Greetings,

I am working on an application that is combining .NET Ajax and the arcgis javascript API. I was am creating dojo objects in vb.net from  the server and I need to create event listeners to those new objects and use them for an existing map. One of the main issues is that I am trying to avoid a complete page refresh to display the point on the map. I have an update panel which that only loads the page partially. I was able to get the map to respond to a dojo checkbox that I added within the HTML. Now I am trying to add the same functionality to one that is created from code behind. Please let me know of any approaches that I may be able to use.

Thanks
0 Kudos
2 Replies
JonathanUihlein
Esri Regular Contributor
Hi Andy!

From the information you've posted, this should be doable.

Have you checked out the API for tutorials or samples?

Do you have any code you can share?
0 Kudos
AndyMonplaisir
New Contributor II
Greetings,

I was able connect the a dojo event listener to a .NET checkbox by using dojo.byId and then connecting it to the html object event. I ended up not using the dojo event listener to get the point to display on the map. Instead I did all of calculations server side and out an array of points using the javascript serializer and then passed it to the initialization function and plotted it using a function within the initialization function. After that I would use the dojo parser which automatically reload the map and this would bring the new point array to the map. Thanks for the response and sorry for the late feedback.

Thanks,
Andy
0 Kudos