Click or drag to resize
HtmlUtilsGetScriptReference Method
Creates a script reference for use on an ASP.NET Web page. Add the script reference to the Scripts collection of a ScriptManager instance.

Namespace: PDTec.IceNet.Web.Utils
Assembly: PDTec.IceNet.Web (in PDTec.IceNet.Web.dll) Version: 6.0.0.0 (6.0.6225.27214)
Syntax
C#
public static ScriptReference GetScriptReference(
	HtmlUtilsScriptResource resource,
	bool minified
)

Parameters

resource
Type: PDTec.IceNet.Web.UtilsHtmlUtilsScriptResource
The script resource.
minified
Type: SystemBoolean
Determines if the minified (compressed) script variant should be retrieved.

Return Value

Type: ScriptReference
The script reference.
Examples

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));
    }
}
See Also