GIF89;a GIF89;a using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using BusinessLayer.BOObjects; using BusinessLayer.Controllers; using BusinessLayer.Entities; using Globals; public partial class ForgotPassword : BasePage { protected void Page_Load(object sender, EventArgs e) { this.CurrentPage = CurrentPageId.BrokerProfile; } protected void btnLogin_Click(object sender, EventArgs e) { ControllerUsers users = new ControllerUsers(); DataSet ds = new DataSet(); ds = users.GetPassword(txtEmail.Text); if (ds.Tables[0].Rows.Count > 0) { string password = ds.Tables[0].Rows[0]["Password"].ToString(); SendMessage(password); lblMessage.Text = GetLocalResourceObject("Message").ToString(); } else { lblMessage.Text = GetLocalResourceObject("EmailNotExists").ToString(); } } protected void SendMessage(string p_password) { string body = String.Format(GetLocalResourceObject("NotificationPasswordEmail").ToString(),txtEmail.Text, p_password); Email.SendEmail(ConfigurationSettings.AppSettings["mailAdmin"], txtEmail.Text, GetLocalResourceObject("SubjectRegistration").ToString(), body); lblMessage.Text = GetLocalResourceObject("Message").ToString(); } }