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)

public static IHtmlString Url(
	string virtualPath
)

Parameters

virtualPath
Type: System.String
The virtual path.

Return Value

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

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.

Show: