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

<!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>Registrar</title>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous" />
    <link href="css/style.css" rel="stylesheet" />
</head>
<body>
    <form id="form1" runat="server">
        <div class="card card-login">
            <div class="card-header">
                Registro
            </div>
            <div class="card-body">
                <div class="form-group">
                    <label for="username_box">Nombre de usuario</label>
                    <asp:TextBox CssClass="form-control" ID="username_box" runat="server" />
                    <asp:RequiredFieldValidator ControlToValidate="username_box" CssClass="invalid-message" ErrorMessage="Debe ingresar un nombre de usuario" Display="Dynamic" EnableClientScript="false" runat="server" />
                    <asp:CustomValidator ID="username_validator" ControlToValidate="username_box" CssClass="invalid-message" OnServerValidate="validateUsername" Display="Dynamic" EnableClientScript="false" runat="server" />
                </div>
                <div class="form-group">
                    <label for="password">Contraseña</label>
                    <asp:TextBox TextMode="Password" CssClass="form-control" ID="password_box" runat="server" />
                    <asp:RequiredFieldValidator ControlToValidate="password_box" CssClass="invalid-message" ErrorMessage="Debe ingresar una contraseña" Display="Dynamic" EnableClientScript="false" runat="server" />
                    <asp:CustomValidator ID="password_validator" ControlToValidate="password_box" CssClass="invalid-message" OnServerValidate="validatePassword" Display="Dynamic" EnableClientScript="false" runat="server" />
                </div>
                <div class="form-group">
                    <label for="password_confirm">Confirmar Contraseña</label>
                    <asp:TextBox TextMode="Password" CssClass="form-control" ID="password_confirm_box" runat="server" />
                    <asp:RequiredFieldValidator ControlToValidate="password_confirm_box" CssClass="invalid-message" ErrorMessage="Debe confirmar la contraseña" Display="Dynamic" EnableClientScript="false" runat="server" />
                    <asp:CompareValidator ControlToValidate="password_confirm_box" CssClass="invalid-message" ControlToCompare="password_box" ErrorMessage="Las contraseñas ingresadas no son iguales" Display="Dynamic" EnableClientScript="false" runat="server" />
                </div>
                <p class="invalid-message">
                    <asp:Literal ID="error_message" runat="server" />
                </p>
                <asp:Button CssClass="btn btn-primary" Text="Registrarse" OnClick="onRegisterClick" runat="server" />
            </div>
        </div>
    </form>
    <script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
</body>
</html>
