Haw to use ClientScript.IsClientScriptBlockRegistered
In almost all places where I find ClientScript.IsClientScriptBlockRegistered in Google, it is used with one parameter (string KEY )
But if you debug you will determine that ClientScript.IsClientScriptBlockRegistered("key") always return FALSE!
The proper using is:
if (!ClientScript.IsClientScriptBlockRegistered("Script1"))
Page.RegisterClientScriptBlock("Script1", "<script type=\"text/javascript\">alert()</script>");
Or...
if (!ClientScript.IsClientScriptBlockRegistered(this.GetType(), "Script1"))
ClientScript.RegisterClientScriptBlock(this.GetType(), "Script1", "alert()", true);