FileCollection.Add Method
This method adds a new file path to the FileCollection.
Syntax
void Add ( object newVal )
| Parameters | Description |
| newVal | A file path to add to the collection. |
Example Code (C#):
//This example adds three files to a FileCollection.
HotDocs_Online.FileCollection fc = new HotDocs_Online.FileCollection();
fc.Add("c:\\temp\\File1.docx");
fc.Add("c:\\temp\\File2.docx");
fc.Add("c:\\temp\\File3.docx");
Example Code (Visual Basic):
' This example adds two files to a file collection and then displays the number
' of files in the collection. Finally, it displays the files in the collection
' as a delimited string.
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