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
Not applicable.



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 Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0