private static ScriptContainerControl GetHeaderEndScriptContainerControl(Page page)
        {
            ScriptContainerControl ctr = (ScriptContainerControl)page.Header.FindControl(_C_HEADER_END_SCRIPT_CONTROL_ID);

            if (ctr == null)
            {
                ctr    = new ScriptContainerControl();
                ctr.ID = _C_HEADER_END_SCRIPT_CONTROL_ID;
                page.Header.Controls.Add(ctr);
            }

            return(ctr);
        }
        /// <summary>
        /// 在body开始后注册Script文件
        /// </summary>
        /// <param name="page">当前页面</param>
        /// <param name="scriptUrl">script文件url路径</param>
        /// <remarks>在body开始后注册Script</remarks>
        public static void RegisterScriptManagerScript(Page page, string scriptUrl)
        {
            ScriptContainerControl ctr = GetScriptContainerControl(page);

            ctr.Add(scriptUrl, ScriptPositionMode.ScriptManager);
        }
        /// <summary>
        /// 在Head结束前注册Script文件
        /// </summary>
        /// <param name="page">当前页面</param>
        /// <param name="scriptUrl">script文件url路径</param>
        /// <remarks>在Head之间注册Script</remarks>
        public static void RegisterHeaderEndScript(Page page, string scriptUrl)
        {
            ScriptContainerControl ctr = GetHeaderEndScriptContainerControl(page);

            ctr.Add(scriptUrl, ScriptPositionMode.Header);
        }