<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Ex3-1.aspx.cs" Inherits="_Default" %>
<html>
<head runat="server">
    <title>Ex3-1</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        用户登录<br />
        用户名：<asp:TextBox ID="txtname" runat="server"></asp:TextBox>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtname" ValidationGroup="vgdl" ErrorMessage="结合使用" Text="请输入用户名"/>
        <br />
        密码：<asp:TextBox ID="txtpwd" runat="server"></asp:TextBox>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
            ControlToValidate="txtpwd" ValidationGroup="vgdl" ErrorMessage="结合使用" 
            SetFocusOnError="True">请输入密码</asp:RequiredFieldValidator>
        <br />
        <asp:Button ID="Button1" runat="server" Text="登录" ValidationGroup="vgdl" 
            onclick="Button1_Click" />
        <asp:Button ID="Button2" runat="server" Text="取消" />
    
    </div>
    </form>
</body>
</html>
