|
Events are the fragements of ASP code executed before or after
record was added, edited, deleted, when new user registers etc.
Therefore events allow you to define some actions that will be
activated when certain conditions are met.
Here are a few examples of some common events:
|
·
|
send an email which contains the data from a new record, or
shows changes to an existing record; |
|
·
|
save data in another table; |
|
·
|
check record uniqueness; |
|
·
|
show related to current record info. |
Events can be divided into global and table events. Global
events are not specific to any table or view.
Table events belong to a table or a
view.
Add an
event
1. Go to the Events
page. If you wish to add/edit a table event, select table in the
tables list.
2. Select event from the tree in the middle pane. On the right
pane you will see definition of the function that implements
selected event and description of the function parameters. To hide
the parameters description click button.
3. You can add your own ASP code or click Add Action button to choose one of the
predefined actions.
More info
about predefined actions and sample events with code snippets. Read
what common parameters you can use in
the event.
4. Choose one of the predefined actions.
5. Modify sample event code by putting the correct values
instead of the values colored in red.
Example: in the sample code below insert:
|
·
|
email address instead of "test@test.com"; |
|
·
|
email subject instead of "Sample subject"; |
|
·
|
email message instead of "Hello there" and "Best regards". |
Note: You can
add several actions to the event.
To edit the event, select event from the tree and modify ASP
code. To delete the event, select event from the tree and click
Clear button.
|