Scripts.Url Method

Returns a fingerprinted URL if the virtualPath is to a bundle, otherwise returns the resolve URL.

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

Syntax

'Declaration
Public Shared Function Url ( _
    virtualPath As String _
) As IHtmlString
'Usage
Dim virtualPath As String 
Dim returnValue As IHtmlString 

returnValue = Scripts.Url(virtualPath)
public static IHtmlString Url(
    string virtualPath
)
public:
static IHtmlString^ Url(
    String^ virtualPath
)
static member Url : 
        virtualPath:string -> IHtmlString
public static function Url(
    virtualPath : String
) : IHtmlString

Parameters

Return Value

Type: System.Web.IHtmlString
A IHtmlString that represents the URL.

Remarks

If the supplied virtual path identifies a bundle, a version-stamped URL is returned. If the virtual path is not a bundle, the resolved virtual path URL is returned.

See Also

Reference

Scripts Class

System.Web.Optimization Namespace