wwrequest::IsPostback

Determines whether the current request is being sent via an HTTP POST operation. Useful in Html Forms based applications for checking for first time display of an Html form, or submitting a form for processing.

This is a simple helper that only checks for the POST Http verb in the request. It does not check or care whether actual content was sent.

This method is meant primarily as a quick check for Html forms based applications to determine whether a request is a display only request or a form post request.

lcId = Request.QueryString("id")
if !loCustBus.Load(lcId)
    loCustBus.New()
ENDIF
loCust = loCustBus.oData

*** on form post back we save data
IF Request.IsPostPack() 
   *** overly simplistic update code
   loCust.Name = Request.Form("name")
   loCust.Address = Request.Form["address"]
   loCustBus.Save()
ENDIF   

*** Display form always
Response.ExpandTemplate()
o.IsPostback()

See also