value must be greater than zero
<asp:DataGrid ID="dgProductList" Style="overflow: auto" runat="server" AllowPaging="True" GridLines="Both" BorderWidth="1" CssClass="gridbody" CellSpacing="1" AutoGenerateColumns="False" PageSize="<%$ AppSettings: GridViewPageSize %>" CellPadding="0"> <asp:TemplateColumn HeaderStyle-CssClass="gridheader"> <HeaderStyle HorizontalAlign="Center" /> <HeaderTemplate> Quantity<sup class="ErrorSymbol">*</sup></HeaderTemplate> <ItemTemplate> <asp:TextBox ID="TxtQuantity" runat="server" Style="width: 50px; text-align: center" MaxLength="6" CssClass="GridTextbox" Text='<%#Bind("prod_quantity") %>'></asp:TextBox> <%--<asp:RequiredFieldValidator id="RFVQuantity" CssClass="text" ControlToValidate="TxtQuantity" runat="server" ErrorMessage="Please Enter Quantity" Display="none"></asp:RequiredFieldValidator>--%> </ItemTemplate> </asp:TemplateColumn> </asp:DataGrid>
<asp:CompareValidator runat="server" id="compTxtQuantity" Operator="GreaterThan" Type="Integer" Display="Dynamic" ValueToCompare="0" ControlToValidate="TxtQuantity" ErrorMessage = "You must enter a value greater than zero." />
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)