This project has moved and is read-only. For the latest updates, please go here.

Where is best to call the GetMap() method in ASP.NET page lifecycle?

Topics: General Topics
Jan 30, 2007 at 12:39 AM

Can someone offer me advice on where in the ASP.NET page lifecycle I am best to call the GetMap() method. I am putting the image that comes from GetMap() into the image cache and then providing a URL to the asp:imagebutton control it will be displayed in. At the moment, I have this running in the ImageButton1Load event, but noticed that all of the demos put it in the PageLoad event.

Is there a best/worst place to put this? Does any one location provide any particular benefits? If I am responding to click events on the map, how should I handle the redraw/updating of the map (e.g. for highlighting a selected feature, for capturing user inputs to create new features, etc)?

If someone can provide a general approach to handling this kind of thing I think many users would benefit from it.


Steve - Melbourne/Australia