Imagine you need to use control validators, and you also need to attach additional logic to OnClick event. These two will fight with each other, if you use conventional interface features. If you add OnClick attribute too early (say in GridView_RowEditing event) it will be overwritten by Validators. If you add OnClick attribute very late (say in Render event) Validators logic will be lost. To make this work, you need to use a special JavaScript function that combines both procedures. Here is how you do it: You need to change a few things on the button that causes validation: <asp:ImageButton ID="imgUpdate" runat="server" CausesValidation="false" OnClientClick="return isValid(this);" ImageUrl="~/Images/Update32x32.png" Text="Update"…