HttpResponse.AddFileDependencies Method (String[])

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[]
)
Not applicable.

Parameters

filenames

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.AddFileDependencies(FileNames);
        Response.Write("File Dependencies sucessfully added!");
    }
          
</script>


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

Community Additions

ADD
Show: