using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class connexion : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void cmd_login_Click(object sender, EventArgs e)
    {
        if (Page.IsValid)
            Response.Redirect("menu.aspx");
    }

    protected void cust_login_ServerValidate(object source, ServerValidateEventArgs args)
    {
        Hashtable t = new Hashtable();
        t["jean@romans.fr"] = "valjean";
        t["victor@romans.fr"] = "hugo";
        if (t[txt_user.Text] == null ||
            t[txt_user.Text] as string != txt_pwd.Text)
        {
            args.IsValid = false;
            cust_login.ErrorMessage = "Utilisateur inconnu ou mot de passe incorrect";
        }
    }
}