Validator controls
Problem: Validators not Validating
Sometimes a validator control will fire off and trigger an error, but then the event associated with that trigger runs anyway
1 | <span class="noprint"> |
In this case, the validator fires an error, but then the record is deleted anyway. The person has no opportunity to see that there was an error.
TO fix this you add logic to your code to see if the page is valid. For example:
1 | Protected Sub btnRowDelete_Click(sender As Object, e As ImageClickEventArgs) |
Here I call the page.validate method, and then if not page.isvalid().