When you use Update Panel dont use ClientScript.RegisterStartupScript
Use ScriptManager.RegisterStartupScript
string srcitp = "alert('Invalid value for update.')";
ScriptManager.RegisterStartupScript(this, this.UpdatePanel1.GetType(),
"srcitp", srcitp, true);