<%@ Page Language="C#" AutoEventWireup="true" CodeFile="validation_discrete.aspx.cs"
    Inherits="validation_discrete" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="uxScriptManagerMasterPage" runat="server" EnableCdn="False">
            <Scripts>
                <asp:ScriptReference Name="jquery" />
            </Scripts>
        </asp:ScriptManager>

        <div>
<fieldset>
    <legend>Commande</legend>
    <table>

        <tr>
            <td>Produit</td>
            <td>
                <asp:DropDownList ID="liste_produits" runat="server"></asp:DropDownList></td>
            <td>
                <asp:RequiredFieldValidator ID="req_produit" runat="server"
                    ControlToValidate="liste_produits" ErrorMessage="Choisir un produit"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td>Quantité</td>
            <td>
                <asp:TextBox ID="txt_quantite" runat="server" Columns="4"></asp:TextBox>
            </td>
            <td>
                <asp:RangeValidator ID="range_quantite" runat="server"
                    ControlToValidate="txt_quantite" ErrorMessage="Nombre entier positif"
                    MaximumValue="1000" MinimumValue="1" Type="Integer"></asp:RangeValidator>
            </td>
        </tr>
        <tr>
            <td></td>
            <td>
                <asp:Button ID="cmd_ajouter" runat="server" Text="Ajouter" />
            </td>
        </tr>
    </table>
</fieldset>
        </div>
    </form>
</body>
</html>
