Sun Chili!Soft ASP Sun Chili!Soft
ASP Sun Microsystems

 

ASP Tools Component ProcessForm Method

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

Arguments: ASP Tools Component ProcessForm Method

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. This parameter has not been implemented. If you include a value for this parameter it will be ignored.

Remarks: ASP Tools Component ProcessForm Method

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.

The scripts can use any of the ASP intrinsics for the page containing the script executing the ProcessForm method except for the Response objects. Instead, the miniscripts have their own Response objects with implementations of Write and BinaryWrite that write to the output file instead of the Web server output stream.

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.

Examples: ASP Tools Component ProcessForm Method

The following code demonstrates calling an .asp file to process a form.

<%

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

%>

Copyright 2002 Sun Microsystems, Inc. All rights reserved. Legal Notice.