HttpResponse.AddFileDependencies Method (String[])

Note: This method is new in the .NET Framework version 2.0.

Adds an array of file names 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 AddFileDependencies (
	string[] filenames
public void AddFileDependencies (
	String[] filenames
public function AddFileDependencies (
	filenames : String[]



An array of files to add.

The following code example adds an array of file names to the AddFileDependencies file dependency list. If the files changes, the cached response is invalidated.

<%@ Page Language="C#" %>
<%@ Import namespace="System.IO" %>

<script runat="server">
    private void Page_Load()
        String[] FileNames = new String[3];
        FileNames[0] = "Test.txt";
        FileNames[1] = "Test2.txt";
        FileNames[2] = "Test3.txt";
        Response.Write("File Dependencies sucessfully added!");

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