I am trying to alter /Templates/Units/Form.ascx.cs in order to replace the original submit button with a asp:imagebutton. Removing the original button with:
form.HideDefaultButtons=true;
works without problems. The problem is that when i add my own button the form.IsPosted returns false instead of true. I have tried to call the original SaveButton_Click in my Save_Click button as suggested by the SDK. This only results in an "Page.IsValid cannot be called before validation has taken place. It should be queried in the event handler for a control with CausesValidation=True or after a call to Page.Validate." exception.
Any hints on how to solve this problem would be appreciated.