Most of the web application consists of login pages which authenticate the user based on username and password. For the registoration purposes you might need to create a random password and email the password to the user and than the user has to use that password to log to the website. In this article we will see how we can create a random password.
Sometimes we need to generate random passwords for users. In this small article we will see two techniques that will generate unique passwords.
The first method of Generating unique password is by using the System.Guid class.
Making custom method to Generate Unique Passwords:
If you want to make your own custom method that generates random passwords than you can use the method below:
string alphabets = "abcdefghijklmnopqrstuvwxyz";
The above method will generate passwords which will be the combination of alphabets and numbers.
I hope you like this article, happy coding !