private void ApplyAssembly(ScriptReference script, bool isComposite) { // if the script has a name and no path, and no assembly or the assembly is set to SWE, // set the path to the resource in ACT. We set the path instead of just changing the assembly // so that ScriptManager still considers the scripts Microsoft Ajax scripts, which allows it to emit // inline script. if (!String.IsNullOrEmpty(script.Name) && String.IsNullOrEmpty(script.Path) && (String.IsNullOrEmpty(script.Assembly) || Assembly.Load(script.Assembly) == typeof(ScriptManager).Assembly)) { if (!isComposite && _scripts.ContainsKey(script.Name)) { RedirectScriptReference sr = new RedirectScriptReference(script.Name); script.Path = sr.GetBaseUrl(ScriptManager.GetCurrent(Page)); script.ScriptMode = ScriptMode.Release; } else { script.Assembly = typeof(ToolkitScriptManager).Assembly.FullName; } } }
private void ApplyAssembly(ScriptReference script, bool isComposite) { // if the script has a name and no path, and no assembly or the assembly is set to SWE, // set the path to the resource in ACT. We set the path instead of just changing the assembly // so that ScriptManager still considers the scripts Microsoft Ajax scripts, which allows it to emit // inline script. if (!String.IsNullOrEmpty(script.Name) && String.IsNullOrEmpty(script.Path) && (String.IsNullOrEmpty(script.Assembly) || Assembly.Load(script.Assembly) == typeof(ScriptManager).Assembly)) { if (!isComposite && _scripts.ContainsKey(script.Name)) { RedirectScriptReference sr = new RedirectScriptReference(script.Name); script.Path = sr.GetBaseUrl(ScriptManager.GetCurrent(Page)); script.ScriptMode = ScriptMode.Release; } else { script.Assembly = typeof(ToolkitScriptManager).Assembly.FullName; } } }