1234567891011121314151617181920212223242526 |
- 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<string> 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);
- });
- }
- }
- }
|