I have a form with a SAVE and SUBMIT button. Each button has its own validation group (validation rules are different between the two buttons). I have a textbox with several validators behind it. Two of them looks like this:
<asp:TextBox ID="txtTitle" runat="server"></asp:TextBox>
<asp:RegularExpressionValidator ID="TitleMaxLengthValidatorOnSave" ControlToValidate="txtTitle" ValidationGroup="SubmitButton" ValidationExpression="(\s|.){0,100}$" ErrorMessage="Title cannot be more than 100 characters" runat="server" />
<asp:RegularExpressionValidator ID="TitleMaxLengthValidatorOnSubmit" ControlToValidate="txtTitle" ValidationGroup="SaveButton" ValidationExpression="(\s|.){0,100}$" ErrorMessage="Title cannot be more than 100 characters" runat="server" /&g ...
Go to the complete details ...