FileExists Method

Determines whether a file at the specified location exists for the specified controller context.

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

Syntax

'Declaration
Protected Overrides Function FileExists ( _
    controllerContext As ControllerContext, _
    virtualPath As String _
) As Boolean
'Usage
Dim controllerContext As ControllerContext
Dim virtualPath As String
Dim returnValue As Boolean

returnValue = Me.FileExists(controllerContext, _
    virtualPath)
protected override bool FileExists(
    ControllerContext controllerContext,
    string virtualPath
)
protected:
virtual bool FileExists(
    ControllerContext^ controllerContext, 
    String^ virtualPath
) override
protected override function FileExists(
    controllerContext : ControllerContext, 
    virtualPath : String
) : boolean

Parameters

Return Value

Type: System. . :: . .Boolean
true if the file exists; otherwise, false.

See Also

Reference

RazorViewEngine Class

System.Web.Mvc Namespace