HtmlUtilsGetScriptReference Method |
Namespace: PDTec.IceNet.Web.Utils
public static ScriptReference GetScriptReference( HtmlUtilsScriptResource resource, bool minified )
This example shows how to add script references to the Scripts collection of a ScriptManager.
protected void Page_Init(object sender, EventArgs e) { if (ScriptManager.GetCurrent(Page).ScriptMode == ScriptMode.Debug) { ScriptManager.GetCurrent(Page).Scripts.Add(HtmlUtils.GetScriptReference(HtmlUtils.ScriptResource.JQuery, false)); ScriptManager.GetCurrent(Page).Scripts.Add(HtmlUtils.GetScriptReference(HtmlUtils.ScriptResource.JQueryUI, false)); } else { ScriptManager.GetCurrent(Page).Scripts.Add(HtmlUtils.GetScriptReference(HtmlUtils.ScriptResource.JQuery, true)); ScriptManager.GetCurrent(Page).Scripts.Add(HtmlUtils.GetScriptReference(HtmlUtils.ScriptResource.JQueryUI, true)); } }