using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Web.UI.HtmlControls; using Bowin.Common.Utility; namespace Bowin.Common { public class IncludeScript { public static void Include(IEnumerable scriptsPath, HtmlHead head) { HtmlGenericControl js; scriptsPath.ForEach((item, index) => { js = new HtmlGenericControl("script"); js.Attributes.Add("type", "text/javascript"); js.Attributes.Add("src", head.ResolveClientUrl(item)); head.Controls.AddAt(index, js); }); } } }