I am using an ESRI toolbar control buddied with a map control.

I am using a command. Below is a simple example.

My question is to clarify - having the ServerAction method is a requirement when you are using the toolbar control and server side action?

public class CustomExtent : IMapServerCommandAction //implements the IServerAction interface
    public CustomExtent()

#region IServerAction Members

public void ServerAction(ToolbarItemInfo info)
   Map map = info.BuddyControls[0] as Map;
   map.Extent = new Envelope(-90, 10, -70, 5);


As quoted from the web ADF reference documentation:

Classes that will be used as the ServerActionClass for a toolbar item must implement this method.

So, unless I misunderstood the question, the answer is yes.

  • GuillaumeC: I read that piece in the documentation which is why I was wanting a clarification to be sure I did not miss anything. I was also curious if someone has been able to implement it differently. I am thinking about creating a toolbar class that just handles the ServerAction Methods that just call and pass parameters to my other classes. – shawn deutch Aug 11 '10 at 16:32

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.