Anil,
Thanks for your sample code, it makes us easy to understand your problem.
I think the reason of your problem is that you use callback to let server side update markers and labels, we only make the stuff related with map control sychronize with client side, but the label is not so it won't be refresh, when the postback operation happened, such as click a button, then the label will be refresh.
To solve this problem, you need to write your code to make them sychronized, one choice is that you can write a class implement ICallback interface to do it, another way is what we recommended, write javacript to overwrite a method OnMapRefresh, I provide the default implementation which may help you to implement.
function OnMapRefresh(map) {
for (var i in map.layers) {
var layer = map.layers[i];
var UpdateInterval = layer.autoRefreshMilliseconds;
var tick = layer.tick;
if (tick && UpdateInterval && UpdateInterval != 0) {
var timer = window.setInterval(Function.createDelegate({ 'args': 'AutoRefresh', 'id': layer.id }, function (evt) {
var args = this.args + "_" + this.id;
eval("CallServerMethod" + map.clientId + "(args, map.clientId)");
}), UpdateInterval);
}
}
}
Thanks,
James