See Also: WebPublishFunction


Make a procedure method available to the WebApp client.


WebPublishProcedure ProcedureName

Argument Explanation

ProcedureName The name of the procedure to publish.

What It Does

WebPublishProcedure makes a procedure available to be called from the WebApp client.

The WebPublish interface forms part of your web application’s security against unauthorized access. When a call is received from a client (browser) the name of the procedure or function that is called is checked against the target object’s list of published methods. Web-publishing a procedure means you are declaring that it is safe to call that method from the client, otherwise the call is rejected and an error is raised.

Only the cWebObject class (or its subclasses) support the WebPublish interface.

Object oMyObject is a cWebObject

    Procedure MyProcedure

        // custom code



    WebPublishProcedure MyProcedure


This example shows how a procedure is declared in a web object and published so that it can be called from the WebApp client using the serverAction interface (see Building Custom Controls for more information).


If you are web-publishing a procedure within a class declaration then you should place WebPublishProcedure within the End_Construct_Object declaration.

For more information see Web Properties Methods and Events.