Scripts.RenderFormat Method

Renders script tags for a set of paths based on a format string.

Namespace:  System.Web.Optimization
Assembly:  System.Web.Optimization (in System.Web.Optimization.dll)


Public Shared Function RenderFormat ( _
    tagFormat As String, _
    ParamArray paths As String() _
) As IHtmlString
Dim tagFormat As String 
Dim paths As String()
Dim returnValue As IHtmlString 

returnValue = Scripts.RenderFormat(tagFormat, _
public static IHtmlString RenderFormat(
    string tagFormat,
    params string[] paths
static IHtmlString^ RenderFormat(
    String^ tagFormat, 
    ... array<String^>^ paths
static member RenderFormat : 
        tagFormat:string * 
        paths:string[] -> IHtmlString
public static function RenderFormat(
    tagFormat : String, 
    ... paths : String[]
) : IHtmlString


  • tagFormat
    Type: System.String
    The format string for defining the rendered script tags.
  • paths
    Type: System.String[]
    Set of virtual paths for which to generate script tags.

Return Value

Type: System.Web.IHtmlString
The HTML string containing the script tag or tags for the bundle.


RenderFormat generates script tags for the supplied paths using the specified format string. It generates multiple script tags for each item in the bundle when EnableOptimizations is set to false. When optimizations are enabled, it generates a single script tag to a version-stamped URL which represents the entire bundle.

See Also


Scripts Class

System.Web.Optimization Namespace