I’m working on a website using VB (ASP.NET)
I want to implement a password recovery code without using the controls in asp.net
I didn’t use ASP.Net Membership for logging in, I have MSSQL database with USER table
What I really I need is:
when the user forget his/her password, he/she enters the email then press a button to submit, then I have to find this email in the user table, retrieve the user name and password, generate new a random password, update the password with the new generated one, and finally send an email to the user with the username and the new generated password.
How can I do that ?
Please help me
Thank you
when the user forget his/her password, he/she enters the email then
press a button to submit
Create a WebForm, with two
<asp:textbox/>and a<asp:button/>, wire up the button’sOnClickeventthen I have to find this email in the user
table, retrieve the user name and password
Use ADO.NET to query the database using the form values posted
Retrieving Data Using a DataReader (ADO.NET)
generate new a random
password
Search Google for a good random password generator
update the password with the new generated one
Use ADO.NET to connect to the db and execute an update statement with SqlCommand.ExecuteNonQuery
send an email to the user with the username and the new generated
password
Use
System.Net.Mailto send an emailSending Email with System.Net.Mail