HttpResponseBase.TransmitFile Method

Definition

Writes the specified file to the HTTP response output stream, without buffering it in memory.

Overloads

TransmitFile(String, Int64, Int64)

Writes the specified part of a file to the HTTP response output stream, without buffering it in memory.

TransmitFile(String)

Writes the specified file to the HTTP response output stream, without buffering it in memory.

TransmitFile(String, Int64, Int64)

Writes the specified part of a file to the HTTP response output stream, without buffering it in memory.

C#
public virtual void TransmitFile(string filename, long offset, long length);

Parameters

filename
String

The name of the file to write to the HTTP output stream.

offset
Int64

The position in the file where writing starts.

length
Int64

The number of bytes to write, starting at offset.

Exceptions

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

TransmitFile(String)

Writes the specified file to the HTTP response output stream, without buffering it in memory.

C#
public virtual void TransmitFile(string filename);

Parameters

filename
String

The name of the file to write to the HTTP output stream.

Exceptions

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1