I am editing a field in gridview and would like that the edited value not be allowed to be greater than the old value?
is there a front end validation for this? so as to not use a javascript popup
Thanks
<asp:TemplateField HeaderText="FC Amount">
<ItemTemplate>
<asp:Label ID="FCLabel" runat="server" Text='<%# Eval("FC AMOUNT") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="FCTextBox1" runat="server" Text='<%# Eval("FC AMOUNT") %>'></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
Use the CompareValidator control:
Add hidden with old value, and compare its value with new one. Or set
ValueToCompareproperty:How to: Validate Against a Specific Value for ASP.NET Server Controls
CompareValidator.Operator Property