public string GeneratePassword(int length)
{
string passwordChars = "ABCDEFGHIJKLMNAOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890";
string password = "";
Random rnd = new Random();
for (int i = 0; i < length; i++)
{
password += passwordChars[rnd.Next(0, passwordChars.Length)];
}
return password;
}