System.Web.Compilation.BuildProvider.OpenStream Method

Opens a stream for reading from a specified virtual path.

Syntax

protected System.IO.Stream OpenStream (string virtualPath)

Parameters

virtualPath
The virtual path to read.

Returns

An open System.IO.Stream that can be used to read the contents of the specified virtual path.

Remarks

Use the System.IO.Stream.Read(Byte[], int, int) method on the returned System.IO.Stream object to read the contents of the virtual path.

After calling the BuildProvider.OpenStream method, you must use the System.IO.Stream.Close method to close the System.IO.Stream object and free associated system resources.

Requirements

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