if I put a button on the page and in the click event of the button i manually throw and error.
throw new Exception("error button clicked");
the event fires and works fine.
but if I put some invalid characters like '<img src' inside a textbox and then click the button (removing the throw) then the OnPageError isn't fired