System.Web.Hosting.VirtualPathProvider.OpenFile Method

Returns a stream from a virtual file.

Syntax

public static System.IO.Stream OpenFile (string virtualPath)

Parameters

virtualPath
The path to the virtual file.

Returns

A read-only System.IO.Stream object for the specified virtual file or resource.

Remarks

The VirtualPathProvider.OpenFile(string) method is a convenience method that enables you to get a stream from a virtual file without creating a System.Web.Hosting.VirtualPathProvider instance.

Requirements

Namespace: System.Web.Hosting
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0