public static HtmlString Image(this HtmlHelper helper, string fileName, string attributes)
 {
     fileName = string.Format("{0}/{1}/{2}", Url.SiteUrl(pubDir), imageDir, fileName);
     return(new HtmlString(string.Format("<img src='{0}' '{1}' />", helper.AttributeEncode(fileName), helper.AttributeEncode(attributes))));
 }
        public static HtmlString Script(this HtmlHelper helper, string fileName)
        {
            if (!fileName.EndsWith(".js"))
            {
                fileName += ".js";
            }
            var jsPath = string.Format("<script src='{0}/{1}/{2}' ></script>\n", Url.SiteUrl(pubDir), scriptDir, helper.AttributeEncode(fileName));

            return(new HtmlString(jsPath));
        }
        public static HtmlString CSS(this HtmlHelper helper, string fileName, string media)
        {
            if (!fileName.EndsWith(".css"))
            {
                fileName += ".css";
            }
            var cssPath = string.Format("<link rel='stylesheet' type='text/css' href='{0}/{1}/{2}'  media='" + media + "'/>\n", Url.SiteUrl(pubDir), cssDir, helper.AttributeEncode(fileName));

            return(new HtmlString(cssPath));
        }
 public static HtmlString LinkTo(this HtmlHelper helper, string text, string url, string attributes)
 {
     url = Url.SiteUrl(url);
     return(new HtmlString(string.Format("<a href='{2}' {1}>{0}</a>", helper.Encode(text), helper.AttributeEncode(attributes), helper.AttributeEncode(url))));
 }