Share via


UrlHelper.Content Method

Converts a virtual (relative) path to an application absolute path.

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

Syntax

'Declaration
Public Function Content ( _
    contentPath As String _
) As String
public string Content(
    string contentPath
)
public:
String^ Content(
    String^ contentPath
)

Parameters

  • contentPath
    Type: System.String
    The virtual path of the content.

Return Value

Type: System.String
The application absolute path.

Remarks

If the specified content path does not start with the tilde (~) character, this method returns contentPath unchanged.

See Also

Reference

UrlHelper Class

System.Web.Mvc Namespace