Writes the specified file directly to an HTTP response output stream, without buffering it in memory.
Public Sub TransmitFile ( _ filename As String _ )
Dim instance As HttpResponse Dim filename As String instance.TransmitFile(filename)
public void TransmitFile( string filename )
public: void TransmitFile( String^ filename )
public function TransmitFile( filename : String )
The filename parameter is nullNothingnullptra null reference (Nothing in Visual Basic)
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
This method does not work with UNC-share file paths, so you have to check it before using this method, for example:
if (filePath.StartsWith(@"\\")) context.Response.WriteFile(filePath, false);else context.Response.TransmitFile(filePath);