public static MvcHtmlString Js(this HtmlHelper html, params string[] jsKeys) { if (jsKeys != null) { string jslink = "<script src='{0}' type='text/javascript'></script>"; StringBuilder sb = new StringBuilder(); foreach (string key in jsKeys) { var jsurl = JsConfig.GetJsUrl(key, html.ViewContext.HttpContext); if (string.IsNullOrEmpty(jsurl)) { continue; } sb.AppendFormat(jslink, UrlHelper.GenerateContentUrl(jsurl, html.ViewContext.HttpContext)); } return(MvcHtmlString.Create(sb.ToString())); } return(MvcHtmlString.Empty); }