Hi Richard,
Thank you for your help,
About security Questions and answers, I fixed it work well now.
But about searching by Email and not username I didn't have success to make it work.
I tried two ways the first is like you writed to see the result if it will be success but no and I tried another way but also no success
The first way
string sql = "SELECT UserName From dbo.CMS_User where Email = 'test@local' "; DataSet ds = CMS.SettingsProvider.SqlHelperClass.ExecuteQuery(sql, null, QueryTypeEnum.SQLQuery); DataRow dr = ds.Tables[0].Rows[0]; string UserName = dr.ItemArray.GetValue(0).ToString();
if (UserName != null)
{
UsernameText.Text = UserName;
}
The second way the one I need the most
string value1 = txt2PasswordRetrieval.Text.Trim();
string sql = "SELECT UserName From dbo.CMS_User where Email =" +value1; DataSet ds = CMS.SettingsProvider.SqlHelperClass.ExecuteQuery(sql, null, QueryTypeEnum.SQLQuery); DataRow dr = ds.Tables[0].Rows[0]; string UserName = dr.ItemArray.GetValue(0).ToString();
if (UserName != null)
{
UsernameText.Text = UserName;
}
But no success as result to retrieve the username from email
Can you help me about this one please
My best regards