AdvantageCMS.Core.Common.BaseClasses Namespace
Build With Advantage

AdvantageHandler..::..POST Method

Handles HTTP POST requests. Override in derived classes to provide custom POST logic.

Namespace:  AdvantageCMS.Core.Common.BaseClasses.Handler
Assembly:  AdvantageCMS.Core (in AdvantageCMS.Core.dll)

Syntax


public virtual Object POST()

Return Value

System.Object.

Examples


Override POST to accept form data and persist a new entity:
C#
public override object POST()
{
    string name = context.Request["name"];
    string category = context.Request["category"];

    var product = new Product { Name = name, Category = category };
    ModuleEngine.PublishObject(product);

    return new { success = true, id = product.ID, message = "Created" };
}