FileCollection.Remove Method

This method removes a file name from the FileCollection.

Syntax

void Remove ( int index )

Parameters Description
index The 0-based index for the item to remove from the collection.

Example

' This example adds two files to a file collection and then displays the number
' of files in the collection. Then it removes the first file from the file
' collection and displays the updated count and string of files.
 
Dim fc
Set fc = Server.CreateObject("HotDocs_Online.FileCollection")
 
fc.Add "c:\inetpub\wwwroot\files\demoempl.docx"
fc.Add "c:\inetpub\wwwroot\files\clauses.docx"
 
Response.Write fc.Count & "<br>"
Response.Write fc.AsString & "<br>"
 
fc.Remove 0
 
Response.Write fc.Count & "<br>"
Response.Write fc.AsString