Ejemplo n.º 1
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        string userName = txtName.Text;
        string question = txtPassQuestion.Text;
        string solution = FormsAuthentication.HashPasswordForStoringInConfigFile(txtPassSolution.Text, "MD5");
        string sql      = "select * from tb_login where Name='" + userName + "' and PassQuestion ='" + question + "' and PassSolution='" + solution + "'";

        try
        {
            OleDbDataReader sdr = mydo.row(sql);
            sdr.Read();
            txtPass.Text = Operate.Decrypting(sdr["Pass"].ToString());
        }
        catch (Exception ex)
        {
            Response.Write(ex.Message.ToString());
        }
    }