/ Published in: C#

Call with the path of any javascript you want to load into the HEAD of the ASPX page.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/// <summary> /// Registers the client script include. /// </summary> /// <param name="src">The file name.</param> void RegisterClientScriptInclude(string src) { System.Web.UI.HtmlControls.HtmlGenericControl si = new System.Web.UI.HtmlControls.HtmlGenericControl(); si.TagName = "script"; si.Attributes.Add("type", "text/javascript"); si.Attributes.Add("src", src); this.Page.Header.Controls.Add(si); }
Comments
