Don't use Label to render you javascript, otherwise you will get the error message every time when your page gets post(Label retains the values as by default the EnableViewState is true for it).
When you are using update panel then only a part of the page gets refresh and if you want fire some javascript from the update panel in that case you need to register your script in the ScriptManager.
like this
ScriptManager.RegisterClientScriptBlock(....)
for more details on this go through this
http://fredrik.nsquared2.com/ViewPost.aspx?PostId=430[
^]