Thank you very much for your timely reply.
I tried the method you mentioned but I have a problem with the ILayer I added to the map. It looks like the map server kept a record of the layer I added to the map, and the existing of this layer will affect the static properties the map service -- for example, if I added the layer by:
the layer IDs of other existing layers will be affected and I have to use the following code to move the layer to the end.
And this layer will stay in the map server until I physically remove it with the following code:
In addition, does this mean is if there are two applications using the same map on the map server, and one application adds a layer to the map, this added layer will affect the other application?
The graphics I want to display on the map are just temporary graphics and I do not want these graphics affect the static properties of current map service.
I just post another question on this forum related to this problem, in which I asked how to add a layer dynamically to the map collected from the map server.
Thanks very much again for your kind help. ^_^