Hi Ganeshcse,
Yes there is one way. I had the same problem faced in my project.
You can define one more javascript method before the service call and hide the div control that is been produced unexpectedly.
I am sharing my code with you for reference.
I had added the following code to hide the unwanted buttons during the popup show.
//Check sataus of the project and call javascript function for hide the unwanted button Image.
if (CurrentDealStatus == Constant.REGISTRATION_REJECTED || CurrentDealStatus == Constant.PROJECT_WON || CurrentDealStatus == Constant.PROJECT_SAVE ||CurrentDealStatus==Constant.REGISTRATION_APPROVE || CurrentDealStatus==Constant.REQUIRES_REVISION)
ScriptManager.RegisterStartupScript(this, this.GetType(),"UserWaitingApprovalButtonHide", "<script type='text/javascript'>UserWaitingApprovalButtonHide();</script>", false);
The client script function is as follows.
function UserWaitingApprovalButtonHide() {
$("#dvSave").hide();
$("#dvSaveSubmit").hide();
$("#dvClaimDiscount").hide();
$("#dvApproveWon").hide();
$("#dvAddProduct").hide();
$("#dvReject").hide();
$("#dvApprove").hide();
$("#dvRevisebtn").hide();
}
Like this you can also implement your code according to your need.
Thanks