Exemplo n.º 1
0
        /// <summary>
        /// Registers the java scripts.
        /// </summary>
        private void RegisterJavaScripts()
        {
            OnRegisterJavaScripts();

            PageIncludes.InitPage(this);


            //ClientScript.RegisterClientScriptInclude("JScript.js", AppSettings.ApplicationJsPath + "JScript.js");

            if (!string.IsNullOrEmpty(DefaultButton))
            {
                onLoadScriptBuilder.AppendLine(string.Format("_defaultButtonID='{0}';", DefaultButton));
            }

            var loadScript = onLoadScriptBuilder.GetScript();

            if (!string.IsNullOrEmpty(loadScript))
            {
                RegisterStartupScript(loadScript);
            }

            ScriptManager.RegisterClientScriptBlock(Page, typeof(PageEx), "PageScript", jScript.ToString(), true);
        }