Thanks all for the various links you have provided. Finally got a clear picture of how to deal with it:
for(var i=0;i<route.length;i++)
{
var input= route[i];
var sdata= input.split("@",19)
//Some code
google.maps.event.addListener(marker,'click',showiwindow(sdata));
}
function showiwindow(rdata)
{
return function(){
.....//some code
document.getElementById('<%= lbl4.ClientID %>').innerHTML =rdata[4];
.....
};
}