<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="form.aspx.cs" Inherits="ExtAspNet.Examples.form.form" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../css/main.css" rel="stylesheet" type="text/css" />
    <style>
        .redcolor
        {
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <ext:PageManager ID="PageManager1" runat="server" />
    <ext:Form Width="600px" BodyPadding="5px" ID="extForm1" EnableBackgroundColor="true"
        LabelWidth="100px" runat="server" Title="Form 1">
        <Rows>
            <ext:FormRow ColumnWidths="40% 60%">
                <Items>
                    <ext:Label ID="Label1" runat="server" Label="Label" Text="Label's value">
                    </ext:Label>
                    <ext:CheckBox ID="CheckBox1" runat="server" Text="CheckBox" Label="CheckBox" CssClass="redcolor">
                    </ext:CheckBox>
                </Items>
            </ext:FormRow>
            <ext:FormRow ColumnWidths="40% 60%">
                <Items>
                    <ext:DropDownList ID="DropDownList1" runat="server" Label="DropDownList" Required="true"
                        ShowRedStar="True">
                        <ext:ListItem Selected="true" Text="Item 1" Value="0"></ext:ListItem>
                        <ext:ListItem Text="Item 2" Value="1"></ext:ListItem>
                    </ext:DropDownList>
                    <ext:TextBox ID="TextBox1" ShowRedStar="true" runat="server" Label="TextBox" Required="true"
                        Text="">
                    </ext:TextBox>
                </Items>
            </ext:FormRow>
            <ext:FormRow>
                <Items>
                    <ext:Panel ID="Panel1" runat="server" EnableBackgroundColor="true" ShowBorder="false"
                        ShowHeader="false">
                        <Items>
                            <ext:Button runat="server" Text="Validate this form and then submit" ValidateForms="extForm1" ID="btnSubmitForm1"
                                OnClick="btnSubmitForm1_Click">
                            </ext:Button>
                        </Items>
                    </ext:Panel>
                </Items>
            </ext:FormRow>
        </Rows>
    </ext:Form>
    <br />
    <ext:Form Width="600px" LabelWidth="100px" EnableBackgroundColor="true" BodyPadding="5px"
        ID="extForm2" runat="server" Title="Form 2">
        <Rows>
            <ext:FormRow>
                <Items>
                    <ext:Label ID="Label3" Label="Phone" Text="0551-1234567" runat="server" />
                    <ext:Label ID="Label16" runat="server" Label="Proposer" Text="admin">
                    </ext:Label>
                </Items>
            </ext:FormRow>
            <ext:FormRow>
                <Items>
                    <ext:Label ID="Label4" Label="No." Text="200804170006" runat="server" />
                    <ext:TextBox ID="TextBox2" Required="true" ShowRedStar="true" Label="Email" RegexPattern="EMAIL"
                        RegexMessage="Please input valid email address!" runat="server">
                    </ext:TextBox>
                </Items>
            </ext:FormRow>
            <ext:FormRow>
                <Items>
                    <ext:DropDownList ID="DropDownList3" Label="Approver" Required="true" runat="server" ShowRedStar="True">
                        <ext:ListItem Text="Boss A" Value="0"></ext:ListItem>
                        <ext:ListItem Text="Boss B" Value="1"></ext:ListItem>
                        <ext:ListItem Text="Boss C" Value="1"></ext:ListItem>
                    </ext:DropDownList>
                </Items>
            </ext:FormRow>
            <ext:FormRow>
                <Items>
                    <ext:NumberBox ID="NumberBox1" Label="Apply Number" MaxValue="1000" Required="true" runat="server"
                        ShowRedStar="True" />
                </Items>
            </ext:FormRow>
            <ext:FormRow>
                <Items>
                    <ext:TextArea ID="TextArea1" runat="server" Label="Description" ShowRedStar="True" Required="True">
                    </ext:TextArea>
                </Items>
            </ext:FormRow>
            <ext:FormRow>
                <Items>
                    <ext:Button ID="btnSubmitAll" Text="Validate these two form and then submit" runat="server" OnClick="btnSubmitAll_Click"
                        ValidateForms="extForm1,extForm2" />
                </Items>
            </ext:FormRow>
        </Rows>
    </ext:Form>
    </form>
</body>
</html>
