This documentation is archived and is not being maintained.

HttpResponse.AddFileDependency Method

Adds a single file name to the collection of file names on which the current response is dependent.

Namespace: System.Web
Assembly: System.Web (in system.web.dll)

public void AddFileDependency (
	string filename
public void AddFileDependency (
	String filename
public function AddFileDependency (
	filename : String



The name of the file to add.

The following code example adds a single file name to the AddFileDependency file dependency list. If the file changes, the cached response is invalidated.

String FileName;
 FileName = "C:\\Files\\F1.txt";

String fileName;
fileName = "C:\\Files\\F1.txt";

var fileName : String = "C:\\Files\\F1.txt"

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0