
protected override void OnInit(EventArgs e) { linkButtonId = this.UniqueID + "_Button"; // Define the name and type of the client scripts on the page. string scriptName = "NotAClue.Web.UI.WebControls.ResourceFiles.NAC_OpenPopup.js"; Type scriptType = this.GetType(); // Get a ClientScriptManager reference from the Page class. ClientScriptManager csm = Page.ClientScript; // Check to see if the Client Script Include is already registered. if (!csm.IsClientScriptIncludeRegistered(scriptType, scriptName)) { // include main Flash Content script string urlJS = csm.GetWebResourceUrl(scriptType, scriptName); csm.RegisterClientScriptInclude(scriptType, scriptName, urlJS); } base.OnInit(e); }
Listing 1 – Sample listing.
No comments:
Post a Comment