System.Web.Mvc.HtmlHelpers.Script C# (CSharp) Method

Script() public static method

public static Script ( this helper, string fileName ) : HtmlString
helper this
fileName string
return HtmlString
        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", GetPublicUrl(helper), scriptDir, helper.AttributeEncode(fileName));
            return new HtmlString(jsPath);
        }

Same methods

HtmlHelpers::Script ( this helper, string debugFilename, string releaseFilename ) : HtmlString