ProcessForm

The ProcessForm method processes the contents of a form that has been submitted by a visitor to the Web site.

Syntax

Tools.ProcessForm(OutputFileURL, TemplateURL, [InsertionPoint])
 

Parameters

OutputFileURL
A string containing the relative URL of the file to which the processed data is written.
TemplateURL
A string containing the relative URL of the file that contains the template, or instructions, for processing the data.
InsertionPoint
An optional parameter indicating where in the output file to insert the process data.

Remarks

The template files can contain ASP scripts. A script between <% and %> delimiters is treated just like other text in the template and copied into the output file. If the output file is an ASP document, the script will run when the output file is accessed. Scripts in template files can also be put between special <%% and %%> delimiters which cause the script to execute while Tools.ProcessForm is executing. Since these scripts are executed before the template data is saved in the output file, the results get saved in the output file, usually as standard text.

If the specified output file does not exist, the server creates it.

If the InsertionPoint parameter does not exist, Tools.ProcessForm replaces the entire output file. If the InsertionPoint parameter exists, and does not begin with an asterisk (*), Tools.ProcessForm finds the InsertionPoint string in the output file and inserts the data immediately after it. If the InsertionPoint string begins with an asterisk (*), Tools.ProcessForm finds the InsertionPoint string in the output file and inserts the data immediately before it. If the InsertionPoint string exists, but is not found in the output file, the data is appended to the end of the file.

Example

The following code is derived from the messageresponse.asp page used by Microsoft® Personal Web Server.

<% 
Tools.processform("/$Received Messages/default.asp","MessageInsert.process","<SPAN>*") 
%>
 

Applies To

Tools Component

See Also

FileExists, Random