place this protected void btnUpdate_Click(object sender, EventArgs e)
{
Popup(false);
}
//To show message after performing operations
void Popup(bool isDisplay)
{
StringBuilder builder = new StringBuilder();
if (isDisplay)
{
builder.Append("<script language=JavaScript> ShowPopup(); </script>\n");
Page.ClientScript.RegisterStartupScript(this.GetType(), "ShowPopup", builder.ToString());
}
else
{
builder.Append("<script language=JavaScript> HidePopup(); </script>\n");
Page.ClientScript.RegisterStartupScript(this.GetType(), "HidePopup", builder.ToString());