When a ASPRunner-generated page runs, the page goes through a life
cycle in which it performs a series of processing steps. These
include initialization, retrieving data, instantiating controls and
rendering. It is important to understand the page life cycle so that
you can write code at the appropriate life-cycle stage for the effect
you intend.
|
BeforeProcessList
BeforeProcessPrint
|
Occurs when page processing starts and database connection is established.
Use this event for the following:
- change database connection to point to another database
- read request data and populate session variables
- redirect to another page |
|
BeforeDelete |
This event will be executed once for each record to be deleted.
Use this event for the following:
- prevent a record from being deleted
- save deleted record in another table
|
|
AfterDelete |
Occurs once for each record after it was deleted |
|
AfterMassDelete |
Occurs after bulk delete opearation |
|
BeforeQueryList
BeforeQueryPrint |
Occurs right before SQL query that retrieves data is executed. Use
this event to modify SQL query i.e. to add an additional filter
(WHERE clause). |
|
BeforeProcessRowList
BeforeProcessRowPrint |
Occurs after database record is retrieved from the database before
formatting is applied.
Use this event for the following:
- modify value of any column
- prevent certain records from being displayed on the page
- calculate/display your own totals and subtotals |
|
BeforeMoveNextList
BeforeMoveNextPrint |
Occurs after database record is retrieved from the database and
formatting is applied.
Use this event for the following:
- display an empty row or a header between group of records.
- apply additional formatting to any column
|
|
BeforeShowList
BeforeShowPrint |
Ocurrs after page is processed and ready to be displayed in the browser.
Use this event for the following:
- define a new Smarty variable or change the value of existing one
- display different template |
|
BeforeProcessEdit
BeforeProcessAdd |
Ocurrs after page is processed and ready to be displayed in the browser.
Use this event for the following:
- define a new Smarty variable or change the value of existing one
- display different template |
|
BeforeEdit
BeforeAdd |
Occurs before new data is written to the database.
Use this event for the following:
- prevent data record from being added or edited
- send an email
- save old record in another table
- add a record to the log table |
|
AfterEdit
AfterAdd |
Occurs after data was written to the database.
Use this event for the following:
- send an email
- add a record to the log table |
|
BeforeQueryEdit |
Occurs right before SQL query that retrieves data is executed. Use
this event to implement additional security i.e. set SQL query to
empty string if for any reason editing is not allowed at this moment. |
|
BeforeShowEdit
BeforeShowAdd |
Ocurrs after page is processed and ready to be displayed in the browser.
Use this event for the following:
- define a new Smarty variable or change the value of existing one
- display different template |
|
BeforeProcessLogin
BeforeProcessRegister |
Ocurrs after page is processed and ready to be displayed in the browser.
Use this event for the following:
- define a new Smarty variable or change the value of existing one
- display different template |
|
BeforeLogin
BeforeRegister |
Occurs before user logs in or new user data is written to the database.
Use this event for the following:
- prevent user from being logged in or registered
- send an email
- add a record to the log table
|
|
AfterSuccessfulLogin
AfterSuccessfulRegistration |
Occurs after user is logged in or registered successfully.
Use this event for the following:
- redirect user to another page
- send an email
- add a record to the log table
|
|
AfterUnsuccessfulLogin
AfterUnsuccessfulRegistration |
Occurs if user was not logged in or was not registered.
|
|
BeforeShowLogin
BeforeShowRegister |
Ocurrs after page is processed and ready to be displayed in the browser.
Use this event for the following:
- define a new Smarty variable or change the value of existing one
- display different template |