Is it necessary to re-register a client-script block on all post-backs if it is added on the first page load like this?
if (this.Page.IsPostBack==false)
{
if (this.Page.ClientScript
.IsClientScriptIncludeRegistered("ctlmyControl")==false)
{
string guidParamToHackBrowserCaching
= System.Guid.NewGuid().ToString();
this.Page.ClientScript.RegisterClientScriptInclude("ctlmyControl"
, ResolveUrl(String
.Format("~/clientScripts/ctlmyControl.js
?par={0}",guidParamToHackBrowserCaching)));
}
}
Any insights or suggestions regarding this matter would be greatly appreciated.