/// <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); }