System.Web.Compilation.BuildProvider.OpenReader Method

Opens a text reader for reading from a specified virtual path.

Syntax

protected System.IO.TextReader OpenReader (string virtualPath)

Parameters

virtualPath
The virtual path to read.

Returns

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

Remarks

Use the erload:System.IO.TextReader.Read method on the returned System.IO.TextReader object to read the contents of the virtual path.

After calling the BuildProvider.OpenReader method, you must use the System.IO.TextReader.Close method to close the System.IO.TextReader 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