Data entry validation

Which could be the best "place" for data validation in a form with several DB advanced edit ?
Can be used for this the onAsyncExit event ?
Thank you.

This will depend on your needs.
Do you want to validate after every entry change or do you want to validate before posting updates?

In the first case OnAsyncExit can help. In the second case, this would be in the handler code for the post, right before the post.

What do you think about using javascript in scriptevents ?

That is also a possible approach, but then of course you need to mix in Javascript code to do this.

Yes, i know. But using the OnAsyncExit the focus, if user input is not validated, don't come back to the original control, even if there a setfocus command, but go always to the next control.

I haven't been able to reproduce this behavior.
The SetFocus command seems to be working as expected when used from the OnAsyncExit event of a TIWAdvEdit control.


If the problem persists, please the following information so I can further investigate this.
- IntraWeb version
- Browser name and version
- A ready to run sample project that demonstrates the issue