protected void lnkForgot_Click(object sender, System.EventArgs e) { string Email = null; string pwd = null; Security.ClsUsers oUser = new Security.ClsUsers(); try { if (string.IsNullOrEmpty(txtUser.Text)) { lblError.Text = "ERROR - Missing User"; return; } oUser.GetEmail(Session["CompanyID"], txtUser.Text); Email = oUser.Email; if (!IsEmail(Email)) { lblError.Text = "Invalid/missing Email"; return; } pwd = oUser.PWord; if (Email > "" & pwd > "") { EmailReset(Email, pwd); } else { lblError.Text = "Invalid/missing Username"; } } catch (Exception ex) { lblError.Text = "lnkForgot:" + ex.Message; } finally { oUser = null; } }