Call Method

Defines the page that will be run automatically following the current page. The output of the new page replaces the output of the page called in its entirety.

Syntax

Response.Call( cFile  )

Parameter

cFile

AFP document where the program execution is to continue. The name is to be entered relative to the current document. Parameters for the new page can be separated by ?. The Response object in the result buffer is deleted before the called page will be run.

Response.Call( "next.afp?record=0815" )

Note

Response.Call() lets you concatenate up to 30 pages.  Server.RedirectLevel() lets you determine the current concatenation depth. Since Response.Call() and Server.Transfer() take advantage of the same mechanism, this constraints applies equally to both functions. Once you have run Response.Call() 20 times you can run Server.Transfer() only 10 more times.

The page invoked will not execute before the current page has been processed. This is why the invocation of Response.Call.() is usually located at the end of a page or immediately prior to a RETURN command. If you make multiple calls of Response.Call() within a page, only the last call will execute.

At every call of a new page a new CCall object is requested. If you have a plug-in that will implement this specific syntax you may delegate the execution to that plug-in.

Response.Call() corresponds to the function of FOX.Call() in AFP 2.x.

Example

<%

  ? "This text nevers appears in the browser.<br>"

  Response.Call("newpage.afp")

%>

See also

Server.Execute() | Server.Transfer() | Response.Redirect()